diff options
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 |