fix betterauth db serial issue

This commit is contained in:
Face 2025-05-22 14:37:19 +03:00
parent 6b6a1d170e
commit 9aa4ba157b
6 changed files with 32 additions and 32 deletions

View file

@ -5,10 +5,10 @@ EXCEPTION
END $$;
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "account" (
"id" text PRIMARY KEY NOT NULL,
"id" serial PRIMARY KEY NOT NULL,
"account_id" text NOT NULL,
"provider_id" text NOT NULL,
"user_id" serial NOT NULL,
"user_id" integer NOT NULL,
"access_token" text,
"refresh_token" text,
"id_token" text,
@ -24,7 +24,7 @@ CREATE TABLE IF NOT EXISTS "coin" (
"id" serial PRIMARY KEY NOT NULL,
"name" varchar(255) NOT NULL,
"symbol" varchar(10) NOT NULL,
"creator_id" serial NOT NULL,
"creator_id" integer,
"initial_supply" numeric(28, 8) NOT NULL,
"circulating_supply" numeric(28, 8) NOT NULL,
"current_price" numeric(19, 8) NOT NULL,
@ -47,20 +47,20 @@ CREATE TABLE IF NOT EXISTS "price_history" (
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "session" (
"id" text PRIMARY KEY NOT NULL,
"id" serial PRIMARY KEY NOT NULL,
"expires_at" timestamp with time zone NOT NULL,
"token" text NOT NULL,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
"ip_address" text,
"user_agent" text,
"user_id" serial NOT NULL,
"user_id" integer NOT NULL,
CONSTRAINT "session_token_unique" UNIQUE("token")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "transaction" (
"id" serial PRIMARY KEY NOT NULL,
"user_id" serial NOT NULL,
"user_id" integer NOT NULL,
"coin_id" integer NOT NULL,
"type" "transaction_type" NOT NULL,
"quantity" numeric(28, 8) NOT NULL,
@ -85,7 +85,7 @@ CREATE TABLE IF NOT EXISTS "user" (
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "user_portfolio" (
"user_id" serial NOT NULL,
"user_id" integer NOT NULL,
"coin_id" integer NOT NULL,
"quantity" numeric(28, 8) NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
@ -93,7 +93,7 @@ CREATE TABLE IF NOT EXISTS "user_portfolio" (
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "verification" (
"id" text PRIMARY KEY NOT NULL,
"id" serial PRIMARY KEY NOT NULL,
"identifier" text NOT NULL,
"value" text NOT NULL,
"expires_at" timestamp with time zone NOT NULL,

View file

@ -1,5 +1,5 @@
{
"id": "c69a25a2-291e-48c8-847d-6d39c4251cab",
"id": "d8f103f7-02e7-4506-95a5-4993abe53030",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "7",
"dialect": "postgresql",
@ -10,7 +10,7 @@
"columns": {
"id": {
"name": "id",
"type": "text",
"type": "serial",
"primaryKey": true,
"notNull": true
},
@ -28,7 +28,7 @@
},
"user_id": {
"name": "user_id",
"type": "serial",
"type": "integer",
"primaryKey": false,
"notNull": true
},
@ -132,9 +132,9 @@
},
"creator_id": {
"name": "creator_id",
"type": "serial",
"type": "integer",
"primaryKey": false,
"notNull": true
"notNull": false
},
"initial_supply": {
"name": "initial_supply",
@ -292,7 +292,7 @@
"columns": {
"id": {
"name": "id",
"type": "text",
"type": "serial",
"primaryKey": true,
"notNull": true
},
@ -336,7 +336,7 @@
},
"user_id": {
"name": "user_id",
"type": "serial",
"type": "integer",
"primaryKey": false,
"notNull": true
}
@ -380,7 +380,7 @@
},
"user_id": {
"name": "user_id",
"type": "serial",
"type": "integer",
"primaryKey": false,
"notNull": true
},
@ -551,7 +551,7 @@
"columns": {
"user_id": {
"name": "user_id",
"type": "serial",
"type": "integer",
"primaryKey": false,
"notNull": true
},
@ -621,7 +621,7 @@
"columns": {
"id": {
"name": "id",
"type": "text",
"type": "serial",
"primaryKey": true,
"notNull": true
},

View file

@ -5,8 +5,8 @@
{
"idx": 0,
"version": "7",
"when": 1747913144586,
"tag": "0000_loose_abomination",
"when": 1747913743324,
"tag": "0000_romantic_firebrand",
"breakpoints": true
}
]