diff options
| author | Fuwn <[email protected]> | 2021-04-28 23:08:04 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-04-28 23:08:04 +0000 |
| commit | 7c77538dcec1cf7fc779e0c5c2e33a9fc0b6e590 (patch) | |
| tree | 33fa38ad9f8460a074d7b09f52ef4a45f7b1a97b | |
| parent | Merge pull request #9 from Whirlsplash/renovate/rust-sqlx-0.x (diff) | |
| download | whirl-7c77538dcec1cf7fc779e0c5c2e33a9fc0b6e590.tar.xz whirl-7c77538dcec1cf7fc779e0c5c2e33a9fc0b6e590.zip | |
fmt: Increase verbosity of database migrations
| -rw-r--r-- | .env | 4 | ||||
| -rw-r--r-- | migrations/20210322015725_serial_numbers.down.sql | 1 | ||||
| -rw-r--r-- | migrations/20210322015725_serial_numbers.sql | 5 | ||||
| -rw-r--r-- | migrations/20210322015725_serial_numbers.up.sql | 5 | ||||
| -rw-r--r-- | migrations/20210322015732_user_registration.down.sql | 1 | ||||
| -rw-r--r-- | migrations/20210322015732_user_registration.sql | 12 | ||||
| -rw-r--r-- | migrations/20210322015732_user_registration.up.sql | 12 | ||||
| -rw-r--r-- | migrations/20210322015737_user_properties.down.sql | 1 | ||||
| -rw-r--r-- | migrations/20210322015737_user_properties.sql | 8 | ||||
| -rw-r--r-- | migrations/20210322015737_user_properties.up.sql | 8 | ||||
| -rw-r--r-- | shell.nix | 2 |
11 files changed, 34 insertions, 25 deletions
@@ -0,0 +1,4 @@ +# This file is *mostly* just a backup for environment variables in case Nix is +# either not working or you just don't want to use it. :) + +DATABASE_URl=sqlite:whirl.db diff --git a/migrations/20210322015725_serial_numbers.down.sql b/migrations/20210322015725_serial_numbers.down.sql new file mode 100644 index 0000000..9b64755 --- /dev/null +++ b/migrations/20210322015725_serial_numbers.down.sql @@ -0,0 +1 @@ +DROP TABLE serial_numbers diff --git a/migrations/20210322015725_serial_numbers.sql b/migrations/20210322015725_serial_numbers.sql deleted file mode 100644 index dd140a9..0000000 --- a/migrations/20210322015725_serial_numbers.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE TABLE "serial_numbers" ( - "serial_number" TEXT NOT NULL UNIQUE, - "user_name" TEXT NOT NULL, - "serial_status" TEXT NOT NULL -); diff --git a/migrations/20210322015725_serial_numbers.up.sql b/migrations/20210322015725_serial_numbers.up.sql new file mode 100644 index 0000000..b0c1895 --- /dev/null +++ b/migrations/20210322015725_serial_numbers.up.sql @@ -0,0 +1,5 @@ +CREATE TABLE serial_numbers ( + serial_number TEXT NOT NULL UNIQUE, + user_name TEXT NOT NULL, + serial_status TEXT NOT NULL +) diff --git a/migrations/20210322015732_user_registration.down.sql b/migrations/20210322015732_user_registration.down.sql new file mode 100644 index 0000000..5bc3c0e --- /dev/null +++ b/migrations/20210322015732_user_registration.down.sql @@ -0,0 +1 @@ +DROP TABLE user_registration diff --git a/migrations/20210322015732_user_registration.sql b/migrations/20210322015732_user_registration.sql deleted file mode 100644 index 6f00d75..0000000 --- a/migrations/20210322015732_user_registration.sql +++ /dev/null @@ -1,12 +0,0 @@ -CREATE TABLE "user_registration" ( - "user_name_lower" TEXT NOT NULL, - "user_name" TEXT NOT NULL, - "serial_number" TEXT NOT NULL, - "password" TEXT NOT NULL, - "client_version" TEXT NOT NULL, - "account_status" INTEGER NOT NULL, - "registration_date" TEXT NOT NULL, - "times_on" INTEGER NOT NULL, - "total_minutes" INTEGER NOT NULL, - "user_privileges" INTEGER NOT NULL -); diff --git a/migrations/20210322015732_user_registration.up.sql b/migrations/20210322015732_user_registration.up.sql new file mode 100644 index 0000000..6a76e9b --- /dev/null +++ b/migrations/20210322015732_user_registration.up.sql @@ -0,0 +1,12 @@ +CREATE TABLE user_registration ( + user_name_lower TEXT NOT NULL, + user_name TEXT NOT NULL, + serial_number TEXT NOT NULL, + password TEXT NOT NULL, + client_version TEXT NOT NULL, + account_status INTEGER NOT NULL, + registration_date TEXT NOT NULL, + times_on INTEGER NOT NULL, + total_minutes INTEGER NOT NULL, + user_privileges INTEGER NOT NULL +) diff --git a/migrations/20210322015737_user_properties.down.sql b/migrations/20210322015737_user_properties.down.sql new file mode 100644 index 0000000..6b03c94 --- /dev/null +++ b/migrations/20210322015737_user_properties.down.sql @@ -0,0 +1 @@ +DROP TABLE user_properties diff --git a/migrations/20210322015737_user_properties.sql b/migrations/20210322015737_user_properties.sql deleted file mode 100644 index a202ec1..0000000 --- a/migrations/20210322015737_user_properties.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE TABLE "user_properties" ( - "user_name" TEXT NOT NULL, - "property_id" INTEGER NOT NULL, - "property_flags" INTEGER NOT NULL, - "property_access" INTEGER NOT NULL, - "property_string_value" TEXT, - "property_binary_value" TEXT -); diff --git a/migrations/20210322015737_user_properties.up.sql b/migrations/20210322015737_user_properties.up.sql new file mode 100644 index 0000000..fe43761 --- /dev/null +++ b/migrations/20210322015737_user_properties.up.sql @@ -0,0 +1,8 @@ +CREATE TABLE user_properties ( + user_name TEXT NOT NULL, + property_id INTEGER NOT NULL, + property_flags INTEGER NOT NULL, + property_access INTEGER NOT NULL, + property_string_value TEXT, + property_binary_value TEXT +) @@ -5,4 +5,6 @@ let in pkgs.mkShell { buildInputs = with pkgs; [ rust ]; + + DATABASE_URL = "sqlite:whirl.db"; } |