Commit b02ae59149964e11ebdc133440e6ace338ed4a2a
- Date: Sun Aug 19 15:00:59 +0000 2007
- Committer: Johan Sørensen (johan@johansorensen.com)
- Author: Johan Sørensen (johan@johansorensen.com)
- Commit SHA1: b02ae59149964e11ebdc133440e6ace338ed4a2a
- Tree SHA1: 27d544b08f332993b30388954717fb28b0a9665d
removed sessions migration and added Project migration
Commit diff
| |   |
| 1 | class CreateProjects < ActiveRecord::Migration |
| 2 | def self.up |
| 3 | create_table :projects do |t| |
| 4 | t.column :name, :string |
| 5 | t.column :description, :text |
| 6 | t.column :user_id, :integer |
| 7 | t.column :created_at, :datetime |
| 8 | t.column :updated_at, :datetime |
| 9 | end |
| 10 | |
| 11 | add_index :projects, :name |
| 12 | add_index :projects, :user_id |
| 13 | end |
| 14 | |
| 15 | def self.down |
| 16 | drop_table :projects |
| 17 | end |
| 18 | end |
| toggle raw diff |
--- /dev/null
+++ b/db/migrate/002_create_projects.rb
@@ -0,0 +1,18 @@
+class CreateProjects < ActiveRecord::Migration
+ def self.up
+ create_table :projects do |t|
+ t.column :name, :string
+ t.column :description, :text
+ t.column :user_id, :integer
+ t.column :created_at, :datetime
+ t.column :updated_at, :datetime
+ end
+
+ add_index :projects, :name
+ add_index :projects, :user_id
+ end
+
+ def self.down
+ drop_table :projects
+ end
+end |
| |   |
| 1 | class CreateProjects < ActiveRecord::Migration |
| 2 | def self.up |
| 3 | create_table :projects do |t| |
| 4 | t.column :name, :string |
| 5 | t.column :description, :text |
| 6 | t.column :user_id, :integer |
| 7 | t.column :created_at, :datetime |
| 8 | t.column :updated_at, :datetime |
| 9 | end |
| 10 | end |
| 11 | |
| 12 | def self.down |
| 13 | drop_table :projects |
| 14 | end |
| 15 | end |
| toggle raw diff |
--- /dev/null
+++ b/db/migrate/003_create_projects.rb
@@ -0,0 +1,15 @@
+class CreateProjects < ActiveRecord::Migration
+ def self.up
+ create_table :projects do |t|
+ t.column :name, :string
+ t.column :description, :text
+ t.column :user_id, :integer
+ t.column :created_at, :datetime
+ t.column :updated_at, :datetime
+ end
+ end
+
+ def self.down
+ drop_table :projects
+ end
+end |