Skip to content

Instantly share code, notes, and snippets.

@noqisofon
Created May 13, 2023 02:20
Show Gist options
  • Save noqisofon/b6001913d2b57420722e71267b8b16bc to your computer and use it in GitHub Desktop.
Save noqisofon/b6001913d2b57420722e71267b8b16bc to your computer and use it in GitHub Desktop.
'./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
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