Created
May 13, 2023 02:20
-
-
Save noqisofon/b6001913d2b57420722e71267b8b16bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'./championships.create.sql'.IO.spurt( q:to/END/ ); | |
CREATE TABLE "championships" ( | |
"championship_id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | |
"champion_kind_id" INTEGER NULL, | |
"name" TEXT NULL | |
); | |
END | |
'./championship_kinds.create.sql'.IO.spurt( q:to/END/ ); | |
CREATE TABLE "championship_kinds" ( | |
"champion_kind_id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | |
"champion_kind_name" TEXT NULL | |
); | |
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -f ./fantasy.db ]; then | |
rm -v ./fantasy.db | |
fi | |
sqlite3 ./fantasy.db < ./championship_kinds.create.sql | |
sqlite3 ./fantasy.db < ./championships.create.sql | |
sqlite3 ./fantasy.db < ./championship_kinds000.insert.sql | |
sqlite3 ./fantasy.db < ./championships000.insert.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment