0001_snapshot.json356 lines, 8.4 KB
| 1 | { |
| 2 | "id": "eb78a36b-ebe6-4fdf-b986-39bb2cb22372", |
| 3 | "prevId": "dd50efd4-b4bf-423f-bdc2-62e66c5ee770", |
| 4 | "version": "7", |
| 5 | "dialect": "postgresql", |
| 6 | "tables": { |
| 7 | "public.accounts": { |
| 8 | "name": "accounts", |
| 9 | "schema": "", |
| 10 | "columns": { |
| 11 | "user_id": { |
| 12 | "name": "user_id", |
| 13 | "type": "varchar(255)", |
| 14 | "primaryKey": false, |
| 15 | "notNull": true |
| 16 | }, |
| 17 | "type": { |
| 18 | "name": "type", |
| 19 | "type": "varchar(255)", |
| 20 | "primaryKey": false, |
| 21 | "notNull": true |
| 22 | }, |
| 23 | "provider": { |
| 24 | "name": "provider", |
| 25 | "type": "varchar(255)", |
| 26 | "primaryKey": false, |
| 27 | "notNull": true |
| 28 | }, |
| 29 | "provider_account_id": { |
| 30 | "name": "provider_account_id", |
| 31 | "type": "varchar(255)", |
| 32 | "primaryKey": false, |
| 33 | "notNull": true |
| 34 | }, |
| 35 | "refresh_token": { |
| 36 | "name": "refresh_token", |
| 37 | "type": "text", |
| 38 | "primaryKey": false, |
| 39 | "notNull": false |
| 40 | }, |
| 41 | "access_token": { |
| 42 | "name": "access_token", |
| 43 | "type": "text", |
| 44 | "primaryKey": false, |
| 45 | "notNull": false |
| 46 | }, |
| 47 | "expires_at": { |
| 48 | "name": "expires_at", |
| 49 | "type": "integer", |
| 50 | "primaryKey": false, |
| 51 | "notNull": false |
| 52 | }, |
| 53 | "token_type": { |
| 54 | "name": "token_type", |
| 55 | "type": "varchar(255)", |
| 56 | "primaryKey": false, |
| 57 | "notNull": false |
| 58 | }, |
| 59 | "scope": { |
| 60 | "name": "scope", |
| 61 | "type": "varchar(255)", |
| 62 | "primaryKey": false, |
| 63 | "notNull": false |
| 64 | }, |
| 65 | "id_token": { |
| 66 | "name": "id_token", |
| 67 | "type": "text", |
| 68 | "primaryKey": false, |
| 69 | "notNull": false |
| 70 | }, |
| 71 | "session_state": { |
| 72 | "name": "session_state", |
| 73 | "type": "varchar(255)", |
| 74 | "primaryKey": false, |
| 75 | "notNull": false |
| 76 | } |
| 77 | }, |
| 78 | "indexes": {}, |
| 79 | "foreignKeys": { |
| 80 | "accounts_user_id_users_id_fk": { |
| 81 | "name": "accounts_user_id_users_id_fk", |
| 82 | "tableFrom": "accounts", |
| 83 | "tableTo": "users", |
| 84 | "columnsFrom": [ |
| 85 | "user_id" |
| 86 | ], |
| 87 | "columnsTo": [ |
| 88 | "id" |
| 89 | ], |
| 90 | "onDelete": "cascade", |
| 91 | "onUpdate": "no action" |
| 92 | } |
| 93 | }, |
| 94 | "compositePrimaryKeys": {}, |
| 95 | "uniqueConstraints": {}, |
| 96 | "policies": {}, |
| 97 | "checkConstraints": {}, |
| 98 | "isRLSEnabled": false |
| 99 | }, |
| 100 | "public.sessions": { |
| 101 | "name": "sessions", |
| 102 | "schema": "", |
| 103 | "columns": { |
| 104 | "session_token": { |
| 105 | "name": "session_token", |
| 106 | "type": "varchar(255)", |
| 107 | "primaryKey": true, |
| 108 | "notNull": true |
| 109 | }, |
| 110 | "user_id": { |
| 111 | "name": "user_id", |
| 112 | "type": "varchar(255)", |
| 113 | "primaryKey": false, |
| 114 | "notNull": true |
| 115 | }, |
| 116 | "expires": { |
| 117 | "name": "expires", |
| 118 | "type": "timestamp", |
| 119 | "primaryKey": false, |
| 120 | "notNull": true |
| 121 | } |
| 122 | }, |
| 123 | "indexes": {}, |
| 124 | "foreignKeys": { |
| 125 | "sessions_user_id_users_id_fk": { |
| 126 | "name": "sessions_user_id_users_id_fk", |
| 127 | "tableFrom": "sessions", |
| 128 | "tableTo": "users", |
| 129 | "columnsFrom": [ |
| 130 | "user_id" |
| 131 | ], |
| 132 | "columnsTo": [ |
| 133 | "id" |
| 134 | ], |
| 135 | "onDelete": "cascade", |
| 136 | "onUpdate": "no action" |
| 137 | } |
| 138 | }, |
| 139 | "compositePrimaryKeys": {}, |
| 140 | "uniqueConstraints": {}, |
| 141 | "policies": {}, |
| 142 | "checkConstraints": {}, |
| 143 | "isRLSEnabled": false |
| 144 | }, |
| 145 | "public.urls": { |
| 146 | "name": "urls", |
| 147 | "schema": "", |
| 148 | "columns": { |
| 149 | "id": { |
| 150 | "name": "id", |
| 151 | "type": "serial", |
| 152 | "primaryKey": true, |
| 153 | "notNull": true |
| 154 | }, |
| 155 | "original_url": { |
| 156 | "name": "original_url", |
| 157 | "type": "varchar(2000)", |
| 158 | "primaryKey": false, |
| 159 | "notNull": true |
| 160 | }, |
| 161 | "short_code": { |
| 162 | "name": "short_code", |
| 163 | "type": "varchar(10)", |
| 164 | "primaryKey": false, |
| 165 | "notNull": true |
| 166 | }, |
| 167 | "created_at": { |
| 168 | "name": "created_at", |
| 169 | "type": "timestamp", |
| 170 | "primaryKey": false, |
| 171 | "notNull": true, |
| 172 | "default": "now()" |
| 173 | }, |
| 174 | "updated_at": { |
| 175 | "name": "updated_at", |
| 176 | "type": "timestamp", |
| 177 | "primaryKey": false, |
| 178 | "notNull": true, |
| 179 | "default": "now()" |
| 180 | }, |
| 181 | "clicks": { |
| 182 | "name": "clicks", |
| 183 | "type": "integer", |
| 184 | "primaryKey": false, |
| 185 | "notNull": true, |
| 186 | "default": 0 |
| 187 | }, |
| 188 | "user_id": { |
| 189 | "name": "user_id", |
| 190 | "type": "varchar(255)", |
| 191 | "primaryKey": false, |
| 192 | "notNull": false |
| 193 | } |
| 194 | }, |
| 195 | "indexes": {}, |
| 196 | "foreignKeys": { |
| 197 | "urls_user_id_users_id_fk": { |
| 198 | "name": "urls_user_id_users_id_fk", |
| 199 | "tableFrom": "urls", |
| 200 | "tableTo": "users", |
| 201 | "columnsFrom": [ |
| 202 | "user_id" |
| 203 | ], |
| 204 | "columnsTo": [ |
| 205 | "id" |
| 206 | ], |
| 207 | "onDelete": "set null", |
| 208 | "onUpdate": "no action" |
| 209 | } |
| 210 | }, |
| 211 | "compositePrimaryKeys": {}, |
| 212 | "uniqueConstraints": { |
| 213 | "urls_short_code_unique": { |
| 214 | "name": "urls_short_code_unique", |
| 215 | "nullsNotDistinct": false, |
| 216 | "columns": [ |
| 217 | "short_code" |
| 218 | ] |
| 219 | } |
| 220 | }, |
| 221 | "policies": {}, |
| 222 | "checkConstraints": {}, |
| 223 | "isRLSEnabled": false |
| 224 | }, |
| 225 | "public.users": { |
| 226 | "name": "users", |
| 227 | "schema": "", |
| 228 | "columns": { |
| 229 | "id": { |
| 230 | "name": "id", |
| 231 | "type": "varchar(255)", |
| 232 | "primaryKey": true, |
| 233 | "notNull": true |
| 234 | }, |
| 235 | "name": { |
| 236 | "name": "name", |
| 237 | "type": "varchar(255)", |
| 238 | "primaryKey": false, |
| 239 | "notNull": false |
| 240 | }, |
| 241 | "email": { |
| 242 | "name": "email", |
| 243 | "type": "varchar(255)", |
| 244 | "primaryKey": false, |
| 245 | "notNull": true |
| 246 | }, |
| 247 | "emailVerified": { |
| 248 | "name": "emailVerified", |
| 249 | "type": "timestamp", |
| 250 | "primaryKey": false, |
| 251 | "notNull": false |
| 252 | }, |
| 253 | "image": { |
| 254 | "name": "image", |
| 255 | "type": "text", |
| 256 | "primaryKey": false, |
| 257 | "notNull": false |
| 258 | }, |
| 259 | "password": { |
| 260 | "name": "password", |
| 261 | "type": "text", |
| 262 | "primaryKey": false, |
| 263 | "notNull": false |
| 264 | }, |
| 265 | "role": { |
| 266 | "name": "role", |
| 267 | "type": "user_role", |
| 268 | "typeSchema": "public", |
| 269 | "primaryKey": false, |
| 270 | "notNull": true, |
| 271 | "default": "'user'" |
| 272 | }, |
| 273 | "created_at": { |
| 274 | "name": "created_at", |
| 275 | "type": "timestamp", |
| 276 | "primaryKey": false, |
| 277 | "notNull": true, |
| 278 | "default": "now()" |
| 279 | }, |
| 280 | "updated_at": { |
| 281 | "name": "updated_at", |
| 282 | "type": "timestamp", |
| 283 | "primaryKey": false, |
| 284 | "notNull": true, |
| 285 | "default": "now()" |
| 286 | } |
| 287 | }, |
| 288 | "indexes": {}, |
| 289 | "foreignKeys": {}, |
| 290 | "compositePrimaryKeys": {}, |
| 291 | "uniqueConstraints": { |
| 292 | "users_email_unique": { |
| 293 | "name": "users_email_unique", |
| 294 | "nullsNotDistinct": false, |
| 295 | "columns": [ |
| 296 | "email" |
| 297 | ] |
| 298 | } |
| 299 | }, |
| 300 | "policies": {}, |
| 301 | "checkConstraints": {}, |
| 302 | "isRLSEnabled": false |
| 303 | }, |
| 304 | "public.verification_token": { |
| 305 | "name": "verification_token", |
| 306 | "schema": "", |
| 307 | "columns": { |
| 308 | "identifier": { |
| 309 | "name": "identifier", |
| 310 | "type": "varchar(255)", |
| 311 | "primaryKey": false, |
| 312 | "notNull": true |
| 313 | }, |
| 314 | "token": { |
| 315 | "name": "token", |
| 316 | "type": "varchar(255)", |
| 317 | "primaryKey": false, |
| 318 | "notNull": true |
| 319 | }, |
| 320 | "expires": { |
| 321 | "name": "expires", |
| 322 | "type": "timestamp", |
| 323 | "primaryKey": false, |
| 324 | "notNull": true |
| 325 | } |
| 326 | }, |
| 327 | "indexes": {}, |
| 328 | "foreignKeys": {}, |
| 329 | "compositePrimaryKeys": {}, |
| 330 | "uniqueConstraints": {}, |
| 331 | "policies": {}, |
| 332 | "checkConstraints": {}, |
| 333 | "isRLSEnabled": false |
| 334 | } |
| 335 | }, |
| 336 | "enums": { |
| 337 | "public.user_role": { |
| 338 | "name": "user_role", |
| 339 | "schema": "public", |
| 340 | "values": [ |
| 341 | "user", |
| 342 | "admin" |
| 343 | ] |
| 344 | } |
| 345 | }, |
| 346 | "schemas": {}, |
| 347 | "sequences": {}, |
| 348 | "roles": {}, |
| 349 | "policies": {}, |
| 350 | "views": {}, |
| 351 | "_meta": { |
| 352 | "columns": {}, |
| 353 | "schemas": {}, |
| 354 | "tables": {} |
| 355 | } |
| 356 | } |