You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/db/migrate/20191220085352_create_compo...

15 lines
417 B

class CreateComposeProjects < ActiveRecord::Migration[5.2]
def change
create_table :compose_projects do |t|
t.integer :user_id
t.integer :project_id
t.integer :compose_id
t.integer :position , default: 0
t.timestamps
end
add_index :compose_projects, [:user_id, :project_id, :compose_id]
add_column :composes, :compose_projects_count, :integer, :default => 0
end
end