diff --git a/drizzle.config.ts b/drizzle.config.ts
index e85917ac..c246563e 100644
--- a/drizzle.config.ts
+++ b/drizzle.config.ts
@@ -3,7 +3,8 @@ import type { Config } from "drizzle-kit";
export default {
schema: "./src/db/schema.ts",
dbCredentials: {
- connectionString: process.env.DB_URL!,
+ connectionString: "postgres://postgres:postgres@localhost:5432/gym-graphs",
},
out: "./drizzle",
+ driver: "pg",
} satisfies Config;
diff --git a/drizzle/0025_gifted_silver_surfer.sql b/drizzle/0025_gifted_silver_surfer.sql
new file mode 100644
index 00000000..edfe937c
--- /dev/null
+++ b/drizzle/0025_gifted_silver_surfer.sql
@@ -0,0 +1 @@
+ALTER TABLE "exercise" ALTER COLUMN "muscle_groups" SET DEFAULT [];
\ No newline at end of file
diff --git a/drizzle/0026_hard_orphan.sql b/drizzle/0026_hard_orphan.sql
new file mode 100644
index 00000000..2ae86ae5
--- /dev/null
+++ b/drizzle/0026_hard_orphan.sql
@@ -0,0 +1 @@
+ALTER TABLE "exercise" ALTER COLUMN "muscle_groups" SET DEFAULT {};
\ No newline at end of file
diff --git a/drizzle/0027_sloppy_firebrand.sql b/drizzle/0027_sloppy_firebrand.sql
new file mode 100644
index 00000000..ff7791f9
--- /dev/null
+++ b/drizzle/0027_sloppy_firebrand.sql
@@ -0,0 +1 @@
+ALTER TABLE "exercise" ALTER COLUMN "muscle_groups" SET DEFAULT '{}';
\ No newline at end of file
diff --git a/drizzle/meta/0025_snapshot.json b/drizzle/meta/0025_snapshot.json
new file mode 100644
index 00000000..d0503b48
--- /dev/null
+++ b/drizzle/meta/0025_snapshot.json
@@ -0,0 +1,460 @@
+{
+ "version": "5",
+ "dialect": "pg",
+ "id": "81cdace0-e33a-465a-b3f0-3559093b29a7",
+ "prevId": "685d708f-336c-4a19-a7b1-ca11083a3f0f",
+ "tables": {
+ "account": {
+ "name": "account",
+ "schema": "",
+ "columns": {
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "providerAccountId": {
+ "name": "providerAccountId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_type": {
+ "name": "token_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scope": {
+ "name": "scope",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "id_token": {
+ "name": "id_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_state": {
+ "name": "session_state",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "account_userId_user_id_fk": {
+ "name": "account_userId_user_id_fk",
+ "tableFrom": "account",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "account_provider_providerAccountId": {
+ "name": "account_provider_providerAccountId",
+ "columns": [
+ "provider",
+ "providerAccountId"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "exercise_grid_position": {
+ "name": "exercise_grid_position",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "exercise_id": {
+ "name": "exercise_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "grid_position": {
+ "name": "grid_position",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "exercise_grid_position_exercise_id_exercise_id_fk": {
+ "name": "exercise_grid_position_exercise_id_exercise_id_fk",
+ "tableFrom": "exercise_grid_position",
+ "tableTo": "exercise",
+ "columnsFrom": [
+ "exercise_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "exercise_grid_position_user_id_user_id_fk": {
+ "name": "exercise_grid_position_user_id_user_id_fk",
+ "tableFrom": "exercise_grid_position",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {}
+ },
+ "exercise": {
+ "name": "exercise",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "muscle_groups": {
+ "name": "muscle_groups",
+ "type": "muscle_groups[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "[]"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "exercise_user_id_user_id_fk": {
+ "name": "exercise_user_id_user_id_fk",
+ "tableFrom": "exercise",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "exercise_user_id_name_unique": {
+ "name": "exercise_user_id_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "name"
+ ]
+ }
+ }
+ },
+ "exercise_data": {
+ "name": "exercise_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "exercise_id": {
+ "name": "exercise_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "number_of_repetitions": {
+ "name": "number_of_repetitions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "weight_lifted": {
+ "name": "weight_lifted",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "done_at": {
+ "name": "done_at",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "exercise_data_exercise_id_exercise_id_fk": {
+ "name": "exercise_data_exercise_id_exercise_id_fk",
+ "tableFrom": "exercise_data",
+ "tableTo": "exercise",
+ "columnsFrom": [
+ "exercise_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "exercise_data_done_at_exercise_id_unique": {
+ "name": "exercise_data_done_at_exercise_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "done_at",
+ "exercise_id"
+ ]
+ }
+ }
+ },
+ "session": {
+ "name": "session",
+ "schema": "",
+ "columns": {
+ "sessionToken": {
+ "name": "sessionToken",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires": {
+ "name": "expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_userId_user_id_fk": {
+ "name": "session_userId_user_id_fk",
+ "tableFrom": "session",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {}
+ },
+ "user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "emailVerified": {
+ "name": "emailVerified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {}
+ },
+ "verificationToken": {
+ "name": "verificationToken",
+ "schema": "",
+ "columns": {
+ "identifier": {
+ "name": "identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires": {
+ "name": "expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "verificationToken_identifier_token": {
+ "name": "verificationToken_identifier_token",
+ "columns": [
+ "identifier",
+ "token"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ }
+ },
+ "enums": {
+ "muscle_groups": {
+ "name": "muscle_groups",
+ "values": {
+ "legs": "legs",
+ "chest": "chest",
+ "biceps": "biceps",
+ "triceps": "triceps",
+ "back": "back",
+ "shoulders": "shoulders",
+ "calfs": "calfs",
+ "abs": "abs",
+ "traps": "traps"
+ }
+ }
+ },
+ "schemas": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/meta/0026_snapshot.json b/drizzle/meta/0026_snapshot.json
new file mode 100644
index 00000000..38d2b1cc
--- /dev/null
+++ b/drizzle/meta/0026_snapshot.json
@@ -0,0 +1,460 @@
+{
+ "version": "5",
+ "dialect": "pg",
+ "id": "51563ec3-f36e-43b8-a180-cf741a2360d9",
+ "prevId": "81cdace0-e33a-465a-b3f0-3559093b29a7",
+ "tables": {
+ "account": {
+ "name": "account",
+ "schema": "",
+ "columns": {
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "providerAccountId": {
+ "name": "providerAccountId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_type": {
+ "name": "token_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scope": {
+ "name": "scope",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "id_token": {
+ "name": "id_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_state": {
+ "name": "session_state",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "account_userId_user_id_fk": {
+ "name": "account_userId_user_id_fk",
+ "tableFrom": "account",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "account_provider_providerAccountId": {
+ "name": "account_provider_providerAccountId",
+ "columns": [
+ "provider",
+ "providerAccountId"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "exercise_grid_position": {
+ "name": "exercise_grid_position",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "exercise_id": {
+ "name": "exercise_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "grid_position": {
+ "name": "grid_position",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "exercise_grid_position_exercise_id_exercise_id_fk": {
+ "name": "exercise_grid_position_exercise_id_exercise_id_fk",
+ "tableFrom": "exercise_grid_position",
+ "tableTo": "exercise",
+ "columnsFrom": [
+ "exercise_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "exercise_grid_position_user_id_user_id_fk": {
+ "name": "exercise_grid_position_user_id_user_id_fk",
+ "tableFrom": "exercise_grid_position",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {}
+ },
+ "exercise": {
+ "name": "exercise",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "muscle_groups": {
+ "name": "muscle_groups",
+ "type": "muscle_groups[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "{}"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "exercise_user_id_user_id_fk": {
+ "name": "exercise_user_id_user_id_fk",
+ "tableFrom": "exercise",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "exercise_user_id_name_unique": {
+ "name": "exercise_user_id_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "name"
+ ]
+ }
+ }
+ },
+ "exercise_data": {
+ "name": "exercise_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "exercise_id": {
+ "name": "exercise_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "number_of_repetitions": {
+ "name": "number_of_repetitions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "weight_lifted": {
+ "name": "weight_lifted",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "done_at": {
+ "name": "done_at",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "exercise_data_exercise_id_exercise_id_fk": {
+ "name": "exercise_data_exercise_id_exercise_id_fk",
+ "tableFrom": "exercise_data",
+ "tableTo": "exercise",
+ "columnsFrom": [
+ "exercise_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "exercise_data_done_at_exercise_id_unique": {
+ "name": "exercise_data_done_at_exercise_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "done_at",
+ "exercise_id"
+ ]
+ }
+ }
+ },
+ "session": {
+ "name": "session",
+ "schema": "",
+ "columns": {
+ "sessionToken": {
+ "name": "sessionToken",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires": {
+ "name": "expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_userId_user_id_fk": {
+ "name": "session_userId_user_id_fk",
+ "tableFrom": "session",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {}
+ },
+ "user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "emailVerified": {
+ "name": "emailVerified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {}
+ },
+ "verificationToken": {
+ "name": "verificationToken",
+ "schema": "",
+ "columns": {
+ "identifier": {
+ "name": "identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires": {
+ "name": "expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "verificationToken_identifier_token": {
+ "name": "verificationToken_identifier_token",
+ "columns": [
+ "identifier",
+ "token"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ }
+ },
+ "enums": {
+ "muscle_groups": {
+ "name": "muscle_groups",
+ "values": {
+ "legs": "legs",
+ "chest": "chest",
+ "biceps": "biceps",
+ "triceps": "triceps",
+ "back": "back",
+ "shoulders": "shoulders",
+ "calfs": "calfs",
+ "abs": "abs",
+ "traps": "traps"
+ }
+ }
+ },
+ "schemas": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/meta/0027_snapshot.json b/drizzle/meta/0027_snapshot.json
new file mode 100644
index 00000000..f5df9ff3
--- /dev/null
+++ b/drizzle/meta/0027_snapshot.json
@@ -0,0 +1,460 @@
+{
+ "version": "5",
+ "dialect": "pg",
+ "id": "49ffbdb0-e141-46ad-bcd3-b4137af3470c",
+ "prevId": "51563ec3-f36e-43b8-a180-cf741a2360d9",
+ "tables": {
+ "account": {
+ "name": "account",
+ "schema": "",
+ "columns": {
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "providerAccountId": {
+ "name": "providerAccountId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_type": {
+ "name": "token_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scope": {
+ "name": "scope",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "id_token": {
+ "name": "id_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_state": {
+ "name": "session_state",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "account_userId_user_id_fk": {
+ "name": "account_userId_user_id_fk",
+ "tableFrom": "account",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "account_provider_providerAccountId": {
+ "name": "account_provider_providerAccountId",
+ "columns": [
+ "provider",
+ "providerAccountId"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "exercise_grid_position": {
+ "name": "exercise_grid_position",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "exercise_id": {
+ "name": "exercise_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "grid_position": {
+ "name": "grid_position",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "exercise_grid_position_exercise_id_exercise_id_fk": {
+ "name": "exercise_grid_position_exercise_id_exercise_id_fk",
+ "tableFrom": "exercise_grid_position",
+ "tableTo": "exercise",
+ "columnsFrom": [
+ "exercise_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "exercise_grid_position_user_id_user_id_fk": {
+ "name": "exercise_grid_position_user_id_user_id_fk",
+ "tableFrom": "exercise_grid_position",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {}
+ },
+ "exercise": {
+ "name": "exercise",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "muscle_groups": {
+ "name": "muscle_groups",
+ "type": "muscle_groups[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "exercise_user_id_user_id_fk": {
+ "name": "exercise_user_id_user_id_fk",
+ "tableFrom": "exercise",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "exercise_user_id_name_unique": {
+ "name": "exercise_user_id_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "name"
+ ]
+ }
+ }
+ },
+ "exercise_data": {
+ "name": "exercise_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "exercise_id": {
+ "name": "exercise_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "number_of_repetitions": {
+ "name": "number_of_repetitions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "weight_lifted": {
+ "name": "weight_lifted",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "done_at": {
+ "name": "done_at",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "exercise_data_exercise_id_exercise_id_fk": {
+ "name": "exercise_data_exercise_id_exercise_id_fk",
+ "tableFrom": "exercise_data",
+ "tableTo": "exercise",
+ "columnsFrom": [
+ "exercise_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "exercise_data_done_at_exercise_id_unique": {
+ "name": "exercise_data_done_at_exercise_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "done_at",
+ "exercise_id"
+ ]
+ }
+ }
+ },
+ "session": {
+ "name": "session",
+ "schema": "",
+ "columns": {
+ "sessionToken": {
+ "name": "sessionToken",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires": {
+ "name": "expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_userId_user_id_fk": {
+ "name": "session_userId_user_id_fk",
+ "tableFrom": "session",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {}
+ },
+ "user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "emailVerified": {
+ "name": "emailVerified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {}
+ },
+ "verificationToken": {
+ "name": "verificationToken",
+ "schema": "",
+ "columns": {
+ "identifier": {
+ "name": "identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires": {
+ "name": "expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "verificationToken_identifier_token": {
+ "name": "verificationToken_identifier_token",
+ "columns": [
+ "identifier",
+ "token"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ }
+ },
+ "enums": {
+ "muscle_groups": {
+ "name": "muscle_groups",
+ "values": {
+ "legs": "legs",
+ "chest": "chest",
+ "biceps": "biceps",
+ "triceps": "triceps",
+ "back": "back",
+ "shoulders": "shoulders",
+ "calfs": "calfs",
+ "abs": "abs",
+ "traps": "traps"
+ }
+ }
+ },
+ "schemas": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json
index b17082c7..776a4be0 100644
--- a/drizzle/meta/_journal.json
+++ b/drizzle/meta/_journal.json
@@ -176,6 +176,27 @@
"when": 1696585145282,
"tag": "0024_lowly_blazing_skull",
"breakpoints": true
+ },
+ {
+ "idx": 25,
+ "version": "5",
+ "when": 1716402185228,
+ "tag": "0025_gifted_silver_surfer",
+ "breakpoints": true
+ },
+ {
+ "idx": 26,
+ "version": "5",
+ "when": 1716402203597,
+ "tag": "0026_hard_orphan",
+ "breakpoints": true
+ },
+ {
+ "idx": 27,
+ "version": "5",
+ "when": 1716402256605,
+ "tag": "0027_sloppy_firebrand",
+ "breakpoints": true
}
]
}
\ No newline at end of file
diff --git a/package.json b/package.json
index 358451d2..309e55d4 100644
--- a/package.json
+++ b/package.json
@@ -8,6 +8,7 @@
"start": "next start",
"lint": "next lint",
"db:generate": "drizzle-kit generate:pg",
+ "db:push": "drizzle-kit push:pg",
"e2e:ui": "npx playwright test --ui"
},
"dependencies": {
diff --git a/src/app/dashboard-new/layout.tsx b/src/app/dashboard-new/layout.tsx
deleted file mode 100644
index d9cbe2c6..00000000
--- a/src/app/dashboard-new/layout.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import { DashboardBackground } from "@/components/ui/dashboardBackground";
-import type { ComponentPropsWithoutRef, PropsWithChildren } from "react";
-
-const Layout = (props: PropsWithChildren) => {
- return (
-
- );
-};
diff --git a/src/app/dashboard/@allExercisesGrid/filtersComponent.tsx b/src/app/dashboard/@allExercisesGrid/filtersComponent.tsx
deleted file mode 100644
index 235fadcc..00000000
--- a/src/app/dashboard/@allExercisesGrid/filtersComponent.tsx
+++ /dev/null
@@ -1,184 +0,0 @@
-"use client";
-
-import type { Exercise } from "@/db/types";
-import { usePathname, useRouter, useSearchParams } from "next/navigation";
-import { useState, useTransition } from "react";
-import type { ChangeEvent } from "react";
-import {
- Tooltip,
- TooltipContent,
- TooltipProvider,
- TooltipTrigger,
-} from "@/components/ui/tooltip";
-import {
- DropdownMenu,
- DropdownMenuCheckboxItem,
- DropdownMenuContent,
- DropdownMenuGroup,
- DropdownMenuItem,
- DropdownMenuLabel,
- DropdownMenuSeparator,
- DropdownMenuTrigger,
-} from "@/components/ui/dropdown-menu";
-import { Button } from "@/components/ui/button";
-import { Filter } from "lucide-react";
-import { Input } from "@/components/ui/input";
-import { Loader } from "@/components/ui/loader";
-import { muscleGroupsEnum } from "@/db/schema";
-
-export const SearchFilter = () => {
- const router = useRouter();
- const pathname = usePathname();
- const searchParams = useSearchParams();
- const [isPending, startTransition] = useTransition();
- const [exerciseName, setExerciseName] = useState(
- searchParams.get("search") ?? "",
- );
-
- const updateExerciseNameUrlParams = (e: ChangeEventtags
-view more
-drag exercise
-
- );
-};
diff --git a/src/app/dashboard/@exercisesByMonthGrid/loading.tsx b/src/app/dashboard/@exercisesByMonthGrid/loading.tsx
deleted file mode 100644
index 618f98b9..00000000
--- a/src/app/dashboard/@exercisesByMonthGrid/loading.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { Skeleton } from "@/components/ui/skeleton";
-import { GridLayout } from "../_grid/gridLayout";
-import { TimelineContainer } from "../timelineContainer";
-import { Badge } from "@/components/ui/badge";
-
-const Loader = () => {
- return (
- <>
- {[...Array