-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Switched to modernc.org/sqlite * No longer need GCC, since we removed CGO * zip is in the base image * Explicitly disable CGO * Use explicit transactions * Small cleanup
- Loading branch information
1 parent
873f4d1
commit 6116b47
Showing
22 changed files
with
156 additions
and
47 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
BEGIN; | ||
|
||
-- Schema | ||
|
||
CREATE TABLE app_user ( | ||
|
@@ -86,3 +88,5 @@ INSERT INTO app_user (username, password_hash, access_level) | |
VALUES('[email protected]', '$2a$08$1C0IMQAwkxLQcYvL/03jpuwOZjyF/6BCXgxHhkoarRoVp1wmiGwAS', 'admin'); | ||
|
||
INSERT INTO app_user_settings(user_id) SELECT id FROM app_user; | ||
|
||
COMMIT; |
4 changes: 4 additions & 0 deletions
4
...ons/sqlite3/0002_app_title_in_db.down.sql → ...ions/sqlite/0002_app_title_in_db.down.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
BEGIN; | ||
|
||
DROP TABLE app_configuration; | ||
|
||
COMMIT; |
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
4 changes: 4 additions & 0 deletions
4
...ons/sqlite3/0003_update_triggers.down.sql → ...ions/sqlite/0003_update_triggers.down.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
BEGIN; | ||
|
||
DROP TRIGGER on_recipe_update; | ||
DROP TRIGGER on_recipe_tag_insert; | ||
DROP TRIGGER on_recipe_tag_delete; | ||
DROP TRIGGER on_recipe_note_update; | ||
DROP TRIGGER on_recipe_image_update; | ||
|
||
COMMIT; |
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
4 changes: 4 additions & 0 deletions
4
...qlite3/0004_storage_instructions.down.sql → ...sqlite/0004_storage_instructions.down.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
BEGIN; | ||
|
||
ALTER TABLE recipe | ||
DROP COLUMN storage_instructions; | ||
|
||
COMMIT; |
4 changes: 4 additions & 0 deletions
4
.../sqlite3/0004_storage_instructions.up.sql → ...s/sqlite/0004_storage_instructions.up.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
BEGIN; | ||
|
||
ALTER TABLE recipe | ||
ADD COLUMN storage_instructions TEXT NOT NULL DEFAULT ''; | ||
|
||
COMMIT; |
4 changes: 4 additions & 0 deletions
4
.../sqlite3/0005_user_favorite_tags.down.sql → ...s/sqlite/0005_user_favorite_tags.down.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
BEGIN; | ||
|
||
DROP TABLE app_user_favorite_tag; | ||
|
||
COMMIT; |
4 changes: 4 additions & 0 deletions
4
...ns/sqlite3/0005_user_favorite_tags.up.sql → ...ons/sqlite/0005_user_favorite_tags.up.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
BEGIN; | ||
|
||
CREATE TABLE app_user_favorite_tag ( | ||
user_id INTEGER NOT NULL, | ||
tag TEXT NOT NULL, | ||
FOREIGN KEY(user_id) REFERENCES app_user(id) ON DELETE CASCADE | ||
); | ||
CREATE INDEX app_user_favorite_tag_idx ON app_user_favorite_tag(tag); | ||
CREATE INDEX app_user_favorite_tag_user_id_idx ON app_user_favorite_tag(user_id); | ||
|
||
COMMIT; |
4 changes: 4 additions & 0 deletions
4
...ions/sqlite3/0006_saved_searches.down.sql → ...tions/sqlite/0006_saved_searches.down.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
BEGIN; | ||
|
||
DROP TABLE search_filter; | ||
DROP TABLE search_filter_field; | ||
DROP TABLE search_filter_state; | ||
DROP TABLE search_filter_tag; | ||
|
||
COMMIT; |
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
4 changes: 4 additions & 0 deletions
4
...grations/sqlite3/0007_user_dates.down.sql → ...igrations/sqlite/0007_user_dates.down.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
BEGIN; | ||
|
||
ALTER TABLE app_user DROP COLUMN created_at; | ||
ALTER TABLE app_user DROP COLUMN modified_at; | ||
|
||
DROP TRIGGER on_app_user_update; | ||
DROP TRIGGER on_app_user_insert; | ||
|
||
COMMIT; |
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
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
Oops, something went wrong.