From bfe3973d0925fa3a429b327563558d36df1934e1 Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Wed, 22 Jun 2022 14:31:23 -0300 Subject: Initial commit --- migrations/initial.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 migrations/initial.rb (limited to 'migrations/initial.rb') 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 -- cgit v1.2.3-70-g09d2