diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/005_create_public_bodies.rb | 16 | ||||
-rw-r--r-- | db/schema.rb | 9 |
2 files changed, 24 insertions, 1 deletions
diff --git a/db/migrate/005_create_public_bodies.rb b/db/migrate/005_create_public_bodies.rb new file mode 100644 index 000000000..d37def301 --- /dev/null +++ b/db/migrate/005_create_public_bodies.rb @@ -0,0 +1,16 @@ +class CreatePublicBodies < ActiveRecord::Migration + def self.up + create_table :public_bodies do |t| + t.column :name, :text + t.column :short_name, :text + # address for making initial FOI requests + t.column :request_email, :text + # address for complaining about an FOI request + t.column :complaint_email, :text + end + end + + def self.down + drop_table :public_bodies + end +end diff --git a/db/schema.rb b/db/schema.rb index de6ac6216..eaabdc961 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2,13 +2,20 @@ # migrations feature of ActiveRecord to incrementally modify your database, and # then regenerate this schema definition. -ActiveRecord::Schema.define(:version => 4) do +ActiveRecord::Schema.define(:version => 5) do create_table "info_requests", :force => true do |t| t.column "title", :text t.column "user_id", :integer 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 + end + create_table "sessions", :force => true do |t| t.column "session_id", :string t.column "data", :text |