Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/auth' into feat/users
Browse files Browse the repository at this point in the history
  • Loading branch information
Drixares committed Oct 30, 2024
2 parents 8c356d2 + 4fe5ae4 commit d25bb06
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 1,112 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
CREATE TABLE IF NOT EXISTS "acquired" (
"user_uuid" uuid,
"challenge_id" serial NOT NULL,
"created_by" serial NOT NULL,
"user_uuid" uuid NOT NULL,
"challenge_id" integer NOT NULL,
"created_by" integer,
"updated_at" timestamp DEFAULT now() NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "acquired_user_uuid_challenge_id_pk" PRIMARY KEY("user_uuid","challenge_id")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "challenges" (
"id" serial PRIMARY KEY NOT NULL,
"club_id" serial NOT NULL,
"club_id" integer,
"score" integer NOT NULL,
"name" text NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL,
Expand All @@ -20,25 +20,26 @@ CREATE TABLE IF NOT EXISTS "clubs" (
"id" serial PRIMARY KEY NOT NULL,
"avatar_url" text NOT NULL,
"name" text NOT NULL,
"description" text NOT NULL,
"daily_date" date NOT NULL,
"description" text,
"daily_date" date,
"updated_at" timestamp DEFAULT now() NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "granters" (
"id" serial PRIMARY KEY NOT NULL,
"club_id" serial NOT NULL,
"club_id" integer NOT NULL,
"email" text NOT NULL,
"password" text NOT NULL
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "users" (
"uuid" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"club_id" serial NOT NULL,
"club_id" integer,
"email" text NOT NULL,
"hashpass" text NOT NULL,
"username" text NOT NULL,
"avatar_url" text,
"quote" text,
"updated_at" timestamp DEFAULT now() NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL
Expand Down
2 changes: 0 additions & 2 deletions database/migrations/0001_nosy_maestro.sql

This file was deleted.

1 change: 0 additions & 1 deletion database/migrations/0002_useful_magma.sql

This file was deleted.

9 changes: 0 additions & 9 deletions database/migrations/0003_vengeful_puppet_master.sql

This file was deleted.

30 changes: 18 additions & 12 deletions database/migrations/meta/0000_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "b0e99e73-e2d8-4775-a232-6adac633f175",
"id": "df1b764a-ce7e-4b2e-9cae-4f14f9a4c96e",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "7",
"dialect": "postgresql",
Expand All @@ -12,19 +12,19 @@
"name": "user_uuid",
"type": "uuid",
"primaryKey": false,
"notNull": false
"notNull": true
},
"challenge_id": {
"name": "challenge_id",
"type": "serial",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"created_by": {
"name": "created_by",
"type": "serial",
"type": "integer",
"primaryKey": false,
"notNull": true
"notNull": false
},
"updated_at": {
"name": "updated_at",
Expand Down Expand Up @@ -95,9 +95,9 @@
},
"club_id": {
"name": "club_id",
"type": "serial",
"type": "integer",
"primaryKey": false,
"notNull": true
"notNull": false
},
"score": {
"name": "score",
Expand Down Expand Up @@ -158,13 +158,13 @@
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": true
"notNull": false
},
"daily_date": {
"name": "daily_date",
"type": "date",
"primaryKey": false,
"notNull": true
"notNull": false
},
"updated_at": {
"name": "updated_at",
Expand Down Expand Up @@ -215,7 +215,7 @@
},
"club_id": {
"name": "club_id",
"type": "serial",
"type": "integer",
"primaryKey": false,
"notNull": true
},
Expand Down Expand Up @@ -251,9 +251,9 @@
},
"club_id": {
"name": "club_id",
"type": "serial",
"type": "integer",
"primaryKey": false,
"notNull": true
"notNull": false
},
"email": {
"name": "email",
Expand All @@ -273,6 +273,12 @@
"primaryKey": false,
"notNull": true
},
"avatar_url": {
"name": "avatar_url",
"type": "text",
"primaryKey": false,
"notNull": false
},
"quote": {
"name": "quote",
"type": "text",
Expand Down
Loading

0 comments on commit d25bb06

Please sign in to comment.