diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/007_add_public_body_editor_notes.rb | 15 | ||||
-rw-r--r-- | db/schema.rb | 30 |
2 files changed, 32 insertions, 13 deletions
diff --git a/db/migrate/007_add_public_body_editor_notes.rb b/db/migrate/007_add_public_body_editor_notes.rb new file mode 100644 index 000000000..7500ee649 --- /dev/null +++ b/db/migrate/007_add_public_body_editor_notes.rb @@ -0,0 +1,15 @@ +class AddPublicBodyEditorNotes < ActiveRecord::Migration + def self.up + add_column :public_bodies, :last_edit_editor, :string + add_column :public_bodies, :last_edit_comment, :string + add_column :public_body_versions, :last_edit_editor, :string + add_column :public_body_versions, :last_edit_comment, :string + end + + def self.down + remove_column :public_bodies, :last_edit_editor + remove_column :public_bodies, :last_edit_comment + remove_column :public_body_versions, :last_edit_editor + remove_column :public_body_versions, :last_edit_comment + end +end diff --git a/db/schema.rb b/db/schema.rb index 46802bf9a..8d159eae6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2,7 +2,7 @@ # migrations feature of ActiveRecord to incrementally modify your database, and # then regenerate this schema definition. -ActiveRecord::Schema.define(:version => 6) do +ActiveRecord::Schema.define(:version => 7) do create_table "info_requests", :force => true do |t| t.column "title", :text @@ -10,21 +10,25 @@ ActiveRecord::Schema.define(:version => 6) do end create_table "public_bodies", :force => true do |t| - t.column "name", :text - t.column "short_name", :text - t.column "request_email", :text - t.column "complaint_email", :text - t.column "version", :integer + t.column "name", :text + t.column "short_name", :text + t.column "request_email", :text + t.column "complaint_email", :text + t.column "version", :integer + t.column "last_edit_editor", :string + t.column "last_edit_comment", :string end create_table "public_body_versions", :force => true do |t| - t.column "public_body_id", :integer - t.column "version", :integer - t.column "name", :text - t.column "short_name", :text - t.column "request_email", :text - t.column "complaint_email", :text - t.column "updated_at", :datetime + t.column "public_body_id", :integer + t.column "version", :integer + t.column "name", :text + t.column "short_name", :text + t.column "request_email", :text + t.column "complaint_email", :text + t.column "updated_at", :datetime + t.column "last_edit_editor", :string + t.column "last_edit_comment", :string end create_table "sessions", :force => true do |t| |