2019-06-28 12:38:52 +02:00
|
|
|
Sequel.migration do
|
|
|
|
change do
|
|
|
|
create_table(:genres) do
|
|
|
|
primary_key :id
|
|
|
|
String :name, null: false
|
|
|
|
end
|
|
|
|
|
|
|
|
create_table(:movies) do
|
|
|
|
primary_key :id
|
|
|
|
String :data, text: true, null: false
|
2019-06-28 12:54:44 +02:00
|
|
|
FalseClass :added, null: false, default: false
|
2019-06-28 12:38:52 +02:00
|
|
|
FalseClass :viewed, null: false, default: false
|
|
|
|
FalseClass :downloaded, null: false, default: false
|
|
|
|
end
|
|
|
|
|
|
|
|
create_join_table(movie_id: :movies, genre_id: :genres)
|
|
|
|
end
|
|
|
|
end
|