Skip to content

Commit

Permalink
Update sqlite3 migration script to match new data model
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefano Da Ros committed Apr 17, 2019
1 parent efc6dc7 commit c4d7859
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions build/migrate-to-sqlite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,27 @@

cat << __EOF__ | sqlite3 test.db
BEGIN;
DROP TABLE IF EXISTS equipment;
DROP TABLE IF EXISTS ingredients;
DROP TABLE IF EXISTS zero_rows;
DROP TABLE IF EXISTS one_rows;
DROP TABLE IF EXISTS ingredient_recipe;
DROP TABLE IF EXISTS inventory;
DROP TABLE IF EXISTS ingredients;
DROP TABLE IF EXISTS recipes;
DROP TABLE IF EXISTS ingredient_recipe;
DROP TABLE IF EXISTS equipment;
CREATE TABLE IF NOT EXISTS zero_rows (
id integer primary key autoincrement,
name text
);
CREATE TABLE IF NOT EXISTS one_rows (
id integer primary key autoincrement,
name text
);
INSERT INTO 'one_rows' ('name')
VALUES
('TESTNAME');
CREATE TABLE IF NOT EXISTS equipment (
id integer primary key autoincrement,
Expand Down

0 comments on commit c4d7859

Please sign in to comment.