Class: CreateProjects
- Inherits:
-
Object
- Object
- CreateProjects
- Defined in:
- lib/twenty-backend/migration/1_create_projects.rb
Instance Method Summary collapse
Instance Method Details
#down ⇒ Object
13 14 15 |
# File 'lib/twenty-backend/migration/1_create_projects.rb', line 13 def down drop_table(:projects) end |
#up ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/twenty-backend/migration/1_create_projects.rb', line 4 def up create_table(:projects) do |t| t.string :name, null: false t.string :path, null: false t. end add_index :projects, [:name, :path], unique: true end |