Class: CreateProjects

Inherits:
Object
  • Object
show all
Defined in:
lib/twenty-backend/migration/1_create_projects.rb

Instance Method Summary collapse

Instance Method Details

#downObject



13
14
15
# File 'lib/twenty-backend/migration/1_create_projects.rb', line 13

def down
  drop_table(:projects)
end

#upObject



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.timestamps
  end
  add_index :projects, [:name, :path], unique: true
end