From 85bc74d555850da3fc9ae7345b6b55dd44550bfd Mon Sep 17 00:00:00 2001 From: Bernd Storath <999999bst@gmail.com> Date: Fri, 7 Mar 2025 08:13:59 +0100 Subject: [PATCH] regenerate migrations with drizzle --- .../database/migrations/0000_short_skin.sql | 8 +-- .../migrations/meta/0000_snapshot.json | 62 +++++++++--------- .../migrations/meta/0001_snapshot.json | 64 ++++++++++--------- .../database/migrations/meta/_journal.json | 4 +- 4 files changed, 73 insertions(+), 65 deletions(-) diff --git a/src/server/database/migrations/0000_short_skin.sql b/src/server/database/migrations/0000_short_skin.sql index 2d8b9d5d..a0cb0a3b 100644 --- a/src/server/database/migrations/0000_short_skin.sql +++ b/src/server/database/migrations/0000_short_skin.sql @@ -4,6 +4,10 @@ CREATE TABLE `clients_table` ( `name` text NOT NULL, `ipv4_address` text NOT NULL, `ipv6_address` text NOT NULL, + `pre_up` text DEFAULT '' NOT NULL, + `post_up` text DEFAULT '' NOT NULL, + `pre_down` text DEFAULT '' NOT NULL, + `post_down` text DEFAULT '' NOT NULL, `private_key` text NOT NULL, `public_key` text NOT NULL, `pre_shared_key` text NOT NULL, @@ -12,10 +16,6 @@ CREATE TABLE `clients_table` ( `server_allowed_ips` text NOT NULL, `persistent_keepalive` integer NOT NULL, `mtu` integer NOT NULL, - `pre_up` text, - `post_up` text, - `pre_down` text, - `post_down` text, `dns` text NOT NULL, `enabled` integer NOT NULL, `created_at` text DEFAULT (CURRENT_TIMESTAMP) NOT NULL, diff --git a/src/server/database/migrations/meta/0000_snapshot.json b/src/server/database/migrations/meta/0000_snapshot.json index ce28c7e8..b7574079 100644 --- a/src/server/database/migrations/meta/0000_snapshot.json +++ b/src/server/database/migrations/meta/0000_snapshot.json @@ -1,7 +1,7 @@ { "version": "6", "dialect": "sqlite", - "id": "b1dde023-d141-4eab-9226-89a832b2ed2b", + "id": "2cabecf8-93d5-4d32-81b7-2e4369c1cb29", "prevId": "00000000-0000-0000-0000-000000000000", "tables": { "clients_table": { @@ -42,6 +42,38 @@ "notNull": true, "autoincrement": false }, + "pre_up": { + "name": "pre_up", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "''" + }, + "post_up": { + "name": "post_up", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "''" + }, + "pre_down": { + "name": "pre_down", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "''" + }, + "post_down": { + "name": "post_down", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "''" + }, "private_key": { "name": "private_key", "type": "text", @@ -98,34 +130,6 @@ "notNull": true, "autoincrement": false }, - "pre_up": { - "name": "pre_up", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "post_up": { - "name": "post_up", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "pre_down": { - "name": "pre_down", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "post_down": { - "name": "post_down", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, "dns": { "name": "dns", "type": "text", diff --git a/src/server/database/migrations/meta/0001_snapshot.json b/src/server/database/migrations/meta/0001_snapshot.json index 989c309c..432a5f10 100644 --- a/src/server/database/migrations/meta/0001_snapshot.json +++ b/src/server/database/migrations/meta/0001_snapshot.json @@ -1,6 +1,6 @@ { - "id": "720d420c-361f-4427-a45b-db0ca613934d", - "prevId": "b1dde023-d141-4eab-9226-89a832b2ed2b", + "id": "9476c20a-509b-4cd7-b58b-a042600bafb1", + "prevId": "2cabecf8-93d5-4d32-81b7-2e4369c1cb29", "version": "6", "dialect": "sqlite", "tables": { @@ -42,6 +42,38 @@ "notNull": true, "autoincrement": false }, + "pre_up": { + "name": "pre_up", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "''" + }, + "post_up": { + "name": "post_up", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "''" + }, + "pre_down": { + "name": "pre_down", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "''" + }, + "post_down": { + "name": "post_down", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "''" + }, "private_key": { "name": "private_key", "type": "text", @@ -98,34 +130,6 @@ "notNull": true, "autoincrement": false }, - "pre_up": { - "name": "pre_up", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "post_up": { - "name": "post_up", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "pre_down": { - "name": "pre_down", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "post_down": { - "name": "post_down", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, "dns": { "name": "dns", "type": "text", diff --git a/src/server/database/migrations/meta/_journal.json b/src/server/database/migrations/meta/_journal.json index 3ce83e4a..6a81e90c 100644 --- a/src/server/database/migrations/meta/_journal.json +++ b/src/server/database/migrations/meta/_journal.json @@ -5,14 +5,14 @@ { "idx": 0, "version": "6", - "when": 1739266828300, + "when": 1741331552405, "tag": "0000_short_skin", "breakpoints": true }, { "idx": 1, "version": "6", - "when": 1739266837347, + "when": 1741331579259, "tag": "0001_classy_the_stranger", "breakpoints": true }