ChandimaPrabath commited on
Commit
56d9508
·
1 Parent(s): 24ba6ae

varchar 16

Browse files
Files changed (1) hide show
  1. init_supabase_sql.txt +2 -2
init_supabase_sql.txt CHANGED
@@ -1,6 +1,6 @@
1
  -- Users table
2
  CREATE TABLE IF NOT EXISTS public.users (
3
- user_id text PRIMARY KEY, -- Use BIGINT for larger integer values
4
  username TEXT UNIQUE NOT NULL,
5
  password TEXT NOT NULL,
6
  email TEXT,
@@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS public.users (
10
 
11
  -- Sessions table with composite primary key (user_id, token)
12
  create table if not exists public.sessions (
13
- user_id text references public.users(user_id),
14
  token text not null,
15
  expires timestamp with time zone not null,
16
  device text not null,
 
1
  -- Users table
2
  CREATE TABLE IF NOT EXISTS public.users (
3
+ user_id varchar(16) PRIMARY KEY, -- Use BIGINT for larger integer values
4
  username TEXT UNIQUE NOT NULL,
5
  password TEXT NOT NULL,
6
  email TEXT,
 
10
 
11
  -- Sessions table with composite primary key (user_id, token)
12
  create table if not exists public.sessions (
13
+ user_id varchar(16) references public.users(user_id),
14
  token text not null,
15
  expires timestamp with time zone not null,
16
  device text not null,