aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Xie <xieconnect@gmail.com>2010-06-06 10:14:09 +0800
committerHans de Graaff <hans@degraaff.org>2010-07-25 09:08:51 +0200
commit854029152445e65fa67a59d49721801a8ee654df (patch)
tree4f489226a6e7e45ed8246f55b6b031a7246b2854 /db/migrate/20100606022209_create_agendas.rb
parentimport User data from db:seed (diff)
downloadcouncil-webapp-854029152445e65fa67a59d49721801a8ee654df.tar.gz
council-webapp-854029152445e65fa67a59d49721801a8ee654df.tar.bz2
council-webapp-854029152445e65fa67a59d49721801a8ee654df.zip
Agenda implemented and tested
Diffstat (limited to 'db/migrate/20100606022209_create_agendas.rb')
-rw-r--r--db/migrate/20100606022209_create_agendas.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20100606022209_create_agendas.rb b/db/migrate/20100606022209_create_agendas.rb
new file mode 100644
index 0000000..14a878d
--- /dev/null
+++ b/db/migrate/20100606022209_create_agendas.rb
@@ -0,0 +1,18 @@
+class CreateAgendas < ActiveRecord::Migration
+ def self.up
+ create_table :agendas do |t|
+ t.string :name
+ t.text :description
+ t.datetime :start_at
+ t.datetime :end_at
+ t.datetime :created_at
+ t.datetime :updated_at
+ t.integer :owner_id
+ end
+ add_index :agendas, [:owner_id]
+ end
+
+ def self.down
+ drop_table :agendas
+ end
+end