|
1 | 1 | {
|
2 |
| - "id": "8bb6c6c1-e68f-4b94-a390-b51666d00dbb", |
| 2 | + "id": "2e0c1e11-ed33-45bf-8084-c3200d8f65a8", |
3 | 3 | "prevId": "00000000-0000-0000-0000-000000000000",
|
4 | 4 | "version": "6",
|
5 | 5 | "dialect": "postgresql",
|
6 | 6 | "tables": {
|
7 |
| - "public.sessions": { |
8 |
| - "name": "sessions", |
| 7 | + "public.email_verifications": { |
| 8 | + "name": "email_verifications", |
9 | 9 | "schema": "",
|
10 | 10 | "columns": {
|
11 | 11 | "id": {
|
|
14 | 14 | "primaryKey": true,
|
15 | 15 | "notNull": true
|
16 | 16 | },
|
| 17 | + "hashed_token": { |
| 18 | + "name": "hashed_token", |
| 19 | + "type": "text", |
| 20 | + "primaryKey": false, |
| 21 | + "notNull": true |
| 22 | + }, |
17 | 23 | "user_id": {
|
18 | 24 | "name": "user_id",
|
19 | 25 | "type": "text",
|
20 | 26 | "primaryKey": false,
|
21 | 27 | "notNull": true
|
22 | 28 | },
|
| 29 | + "requested_email": { |
| 30 | + "name": "requested_email", |
| 31 | + "type": "text", |
| 32 | + "primaryKey": false, |
| 33 | + "notNull": true |
| 34 | + }, |
23 | 35 | "expires_at": {
|
24 | 36 | "name": "expires_at",
|
25 | 37 | "type": "timestamp with time zone",
|
26 | 38 | "primaryKey": false,
|
27 | 39 | "notNull": true
|
| 40 | + }, |
| 41 | + "created_at": { |
| 42 | + "name": "created_at", |
| 43 | + "type": "timestamp with time zone", |
| 44 | + "primaryKey": false, |
| 45 | + "notNull": true, |
| 46 | + "default": "now()" |
| 47 | + }, |
| 48 | + "updated_at": { |
| 49 | + "name": "updated_at", |
| 50 | + "type": "timestamp with time zone", |
| 51 | + "primaryKey": false, |
| 52 | + "notNull": true, |
| 53 | + "default": "now()" |
28 | 54 | }
|
29 | 55 | },
|
30 | 56 | "indexes": {},
|
31 | 57 | "foreignKeys": {
|
32 |
| - "sessions_user_id_users_id_fk": { |
33 |
| - "name": "sessions_user_id_users_id_fk", |
34 |
| - "tableFrom": "sessions", |
| 58 | + "email_verifications_user_id_users_id_fk": { |
| 59 | + "name": "email_verifications_user_id_users_id_fk", |
| 60 | + "tableFrom": "email_verifications", |
35 | 61 | "tableTo": "users",
|
36 | 62 | "columnsFrom": [
|
37 | 63 | "user_id"
|
|
44 | 70 | }
|
45 | 71 | },
|
46 | 72 | "compositePrimaryKeys": {},
|
47 |
| - "uniqueConstraints": {} |
| 73 | + "uniqueConstraints": { |
| 74 | + "email_verifications_user_id_unique": { |
| 75 | + "name": "email_verifications_user_id_unique", |
| 76 | + "nullsNotDistinct": false, |
| 77 | + "columns": [ |
| 78 | + "user_id" |
| 79 | + ] |
| 80 | + } |
| 81 | + } |
48 | 82 | },
|
49 |
| - "public.tokens": { |
50 |
| - "name": "tokens", |
| 83 | + "public.login_requests": { |
| 84 | + "name": "login_requests", |
51 | 85 | "schema": "",
|
52 | 86 | "columns": {
|
53 | 87 | "id": {
|
|
56 | 90 | "primaryKey": true,
|
57 | 91 | "notNull": true
|
58 | 92 | },
|
59 |
| - "token": { |
60 |
| - "name": "token", |
61 |
| - "type": "text", |
62 |
| - "primaryKey": false, |
63 |
| - "notNull": true |
64 |
| - }, |
65 |
| - "user_id": { |
66 |
| - "name": "user_id", |
| 93 | + "hashed_token": { |
| 94 | + "name": "hashed_token", |
67 | 95 | "type": "text",
|
68 | 96 | "primaryKey": false,
|
69 | 97 | "notNull": true
|
|
96 | 124 | }
|
97 | 125 | },
|
98 | 126 | "indexes": {},
|
| 127 | + "foreignKeys": {}, |
| 128 | + "compositePrimaryKeys": {}, |
| 129 | + "uniqueConstraints": { |
| 130 | + "login_requests_email_unique": { |
| 131 | + "name": "login_requests_email_unique", |
| 132 | + "nullsNotDistinct": false, |
| 133 | + "columns": [ |
| 134 | + "email" |
| 135 | + ] |
| 136 | + } |
| 137 | + } |
| 138 | + }, |
| 139 | + "public.sessions": { |
| 140 | + "name": "sessions", |
| 141 | + "schema": "", |
| 142 | + "columns": { |
| 143 | + "id": { |
| 144 | + "name": "id", |
| 145 | + "type": "text", |
| 146 | + "primaryKey": true, |
| 147 | + "notNull": true |
| 148 | + }, |
| 149 | + "user_id": { |
| 150 | + "name": "user_id", |
| 151 | + "type": "text", |
| 152 | + "primaryKey": false, |
| 153 | + "notNull": true |
| 154 | + }, |
| 155 | + "expires_at": { |
| 156 | + "name": "expires_at", |
| 157 | + "type": "timestamp with time zone", |
| 158 | + "primaryKey": false, |
| 159 | + "notNull": true |
| 160 | + } |
| 161 | + }, |
| 162 | + "indexes": {}, |
99 | 163 | "foreignKeys": {
|
100 |
| - "tokens_user_id_users_id_fk": { |
101 |
| - "name": "tokens_user_id_users_id_fk", |
102 |
| - "tableFrom": "tokens", |
| 164 | + "sessions_user_id_users_id_fk": { |
| 165 | + "name": "sessions_user_id_users_id_fk", |
| 166 | + "tableFrom": "sessions", |
103 | 167 | "tableTo": "users",
|
104 | 168 | "columnsFrom": [
|
105 | 169 | "user_id"
|
|
112 | 176 | }
|
113 | 177 | },
|
114 | 178 | "compositePrimaryKeys": {},
|
115 |
| - "uniqueConstraints": { |
116 |
| - "tokens_token_unique": { |
117 |
| - "name": "tokens_token_unique", |
118 |
| - "nullsNotDistinct": false, |
119 |
| - "columns": [ |
120 |
| - "token" |
121 |
| - ] |
122 |
| - } |
123 |
| - } |
| 179 | + "uniqueConstraints": {} |
124 | 180 | },
|
125 | 181 | "public.users": {
|
126 | 182 | "name": "users",
|
|
0 commit comments