Skip to content

Commit

Permalink
Merge pull request #11 from Jupeyy/pr_create_if_not_exists
Browse files Browse the repository at this point in the history
Use `CREATE TABLE IF NOT EXISTS` to not fail on second setup
  • Loading branch information
Jupeyy authored Jan 4, 2025
2 parents ee7e250 + d711c49 commit ea1d5ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion game/vanilla/src/sql/mysql/save/saves.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE user_save (
CREATE TABLE IF NOT EXISTS user_save (
id BIGINT NOT NULL AUTO_INCREMENT,
user_id BIGINT,
user_hash BINARY(32),
Expand Down
2 changes: 1 addition & 1 deletion game/vanilla/src/sql/sqlite/save/saves.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE user_save (
CREATE TABLE IF NOT EXISTS user_save (
id INTEGER AUTO_INCREMENT,
user_id INTEGER UNIQUE,
user_hash BINARY(32) UNIQUE,
Expand Down

0 comments on commit ea1d5ab

Please sign in to comment.