505 lines
12 KiB
JSON
505 lines
12 KiB
JSON
{
|
|
"version": "6",
|
|
"dialect": "sqlite",
|
|
"id": "c4fbb77c-3439-446a-92e4-14a4b681f83e",
|
|
"prevId": "fb2c8ded-5e0a-4d12-b729-a5d89be3ca14",
|
|
"tables": {
|
|
"account": {
|
|
"name": "account",
|
|
"columns": {
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"provider": {
|
|
"name": "provider",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"providerAccountId": {
|
|
"name": "providerAccountId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"refresh_token": {
|
|
"name": "refresh_token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"access_token": {
|
|
"name": "access_token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"token_type": {
|
|
"name": "token_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"scope": {
|
|
"name": "scope",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"id_token": {
|
|
"name": "id_token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"session_state": {
|
|
"name": "session_state",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"account_userId_user_id_fk": {
|
|
"name": "account_userId_user_id_fk",
|
|
"tableFrom": "account",
|
|
"tableTo": "user",
|
|
"columnsFrom": [
|
|
"userId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"account_provider_providerAccountId_pk": {
|
|
"columns": [
|
|
"provider",
|
|
"providerAccountId"
|
|
],
|
|
"name": "account_provider_providerAccountId_pk"
|
|
}
|
|
},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"apiKey": {
|
|
"name": "apiKey",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"keyId": {
|
|
"name": "keyId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"keyHash": {
|
|
"name": "keyHash",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"apiKey_keyId_unique": {
|
|
"name": "apiKey_keyId_unique",
|
|
"columns": [
|
|
"keyId"
|
|
],
|
|
"isUnique": true
|
|
},
|
|
"apiKey_name_userId_unique": {
|
|
"name": "apiKey_name_userId_unique",
|
|
"columns": [
|
|
"name",
|
|
"userId"
|
|
],
|
|
"isUnique": true
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"apiKey_userId_user_id_fk": {
|
|
"name": "apiKey_userId_user_id_fk",
|
|
"tableFrom": "apiKey",
|
|
"tableTo": "user",
|
|
"columnsFrom": [
|
|
"userId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"config": {
|
|
"name": "config",
|
|
"columns": {
|
|
"key": {
|
|
"name": "key",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"value": {
|
|
"name": "value",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"day": {
|
|
"name": "day",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"mood": {
|
|
"name": "mood",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"date": {
|
|
"name": "date",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"comment": {
|
|
"name": "comment",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"day_date_unique": {
|
|
"name": "day_date_unique",
|
|
"columns": [
|
|
"date"
|
|
],
|
|
"isUnique": true
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"label": {
|
|
"name": "label",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"code": {
|
|
"name": "code",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"color": {
|
|
"name": "color",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "'#000000'"
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"label_userId_name_unique": {
|
|
"name": "label_userId_name_unique",
|
|
"columns": [
|
|
"userId",
|
|
"name"
|
|
],
|
|
"isUnique": true
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"label_userId_user_id_fk": {
|
|
"name": "label_userId_user_id_fk",
|
|
"tableFrom": "label",
|
|
"tableTo": "user",
|
|
"columnsFrom": [
|
|
"userId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"session": {
|
|
"name": "session",
|
|
"columns": {
|
|
"sessionToken": {
|
|
"name": "sessionToken",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"expires": {
|
|
"name": "expires",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"session_userId_user_id_fk": {
|
|
"name": "session_userId_user_id_fk",
|
|
"tableFrom": "session",
|
|
"tableTo": "user",
|
|
"columnsFrom": [
|
|
"userId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"user": {
|
|
"name": "user",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"emailVerified": {
|
|
"name": "emailVerified",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"image": {
|
|
"name": "image",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"password": {
|
|
"name": "password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"role": {
|
|
"name": "role",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "'user'"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"user_email_unique": {
|
|
"name": "user_email_unique",
|
|
"columns": [
|
|
"email"
|
|
],
|
|
"isUnique": true
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"verificationToken": {
|
|
"name": "verificationToken",
|
|
"columns": {
|
|
"identifier": {
|
|
"name": "identifier",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"token": {
|
|
"name": "token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"expires": {
|
|
"name": "expires",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"verificationToken_identifier_token_pk": {
|
|
"columns": [
|
|
"identifier",
|
|
"token"
|
|
],
|
|
"name": "verificationToken_identifier_token_pk"
|
|
}
|
|
},
|
|
"uniqueConstraints": {}
|
|
}
|
|
},
|
|
"enums": {},
|
|
"_meta": {
|
|
"schemas": {},
|
|
"tables": {},
|
|
"columns": {}
|
|
},
|
|
"internal": {
|
|
"indexes": {}
|
|
}
|
|
} |