diff options
author | Matias Linares <matias.linares@comprandoengrupo.net> | 2022-06-22 14:31:23 -0300 |
---|---|---|
committer | Matias Linares <matias.linares@comprandoengrupo.net> | 2022-06-22 14:31:23 -0300 |
commit | bfe3973d0925fa3a429b327563558d36df1934e1 (patch) | |
tree | 9f3bf3417012679ac0fa0ac48039f58f8ca52e84 /migrations | |
download | bass-player-bfe3973d0925fa3a429b327563558d36df1934e1.tar.gz |
Initial commit
Diffstat (limited to 'migrations')
-rw-r--r-- | migrations/initial.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/migrations/initial.rb b/migrations/initial.rb new file mode 100644 index 0000000..b19aba3 --- /dev/null +++ b/migrations/initial.rb @@ -0,0 +1,20 @@ +require "sequel" + +DB = Sequel.connect('sqlite:///tmp/bass-player.db') + +DB.create_table(:songs) do + primary_key :id + String :title + Integer :duration + String :path + + foreign_key :song_id, :songs +end + +DB.create_table(:parts) do + primary_key :id + String :name + Integer :from + Integer :to + Integer :song_id +end |