recreate drizzle stuff
This commit is contained in:
parent
9dfb0628c4
commit
1b2d60905c
31 changed files with 1159 additions and 15191 deletions
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"id": "75ce764f-a039-4e66-9ebb-620e13d1fa85",
|
||||
"id": "077132a0-ccad-4d56-855b-150b8fe31d94",
|
||||
"prevId": "00000000-0000-0000-0000-000000000000",
|
||||
"version": "7",
|
||||
"dialect": "postgresql",
|
||||
|
|
@ -108,6 +108,123 @@
|
|||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {}
|
||||
},
|
||||
"public.account_deletion_request": {
|
||||
"name": "account_deletion_request",
|
||||
"schema": "",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
"type": "serial",
|
||||
"primaryKey": true,
|
||||
"notNull": true
|
||||
},
|
||||
"user_id": {
|
||||
"name": "user_id",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"requested_at": {
|
||||
"name": "requested_at",
|
||||
"type": "timestamp with time zone",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "now()"
|
||||
},
|
||||
"scheduled_deletion_at": {
|
||||
"name": "scheduled_deletion_at",
|
||||
"type": "timestamp with time zone",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"reason": {
|
||||
"name": "reason",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"is_processed": {
|
||||
"name": "is_processed",
|
||||
"type": "boolean",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"account_deletion_request_user_id_idx": {
|
||||
"name": "account_deletion_request_user_id_idx",
|
||||
"columns": [
|
||||
{
|
||||
"expression": "user_id",
|
||||
"isExpression": false,
|
||||
"asc": true,
|
||||
"nulls": "last"
|
||||
}
|
||||
],
|
||||
"isUnique": false,
|
||||
"concurrently": false,
|
||||
"method": "btree",
|
||||
"with": {}
|
||||
},
|
||||
"account_deletion_request_scheduled_deletion_idx": {
|
||||
"name": "account_deletion_request_scheduled_deletion_idx",
|
||||
"columns": [
|
||||
{
|
||||
"expression": "scheduled_deletion_at",
|
||||
"isExpression": false,
|
||||
"asc": true,
|
||||
"nulls": "last"
|
||||
}
|
||||
],
|
||||
"isUnique": false,
|
||||
"concurrently": false,
|
||||
"method": "btree",
|
||||
"with": {}
|
||||
},
|
||||
"account_deletion_request_open_idx": {
|
||||
"name": "account_deletion_request_open_idx",
|
||||
"columns": [
|
||||
{
|
||||
"expression": "user_id",
|
||||
"isExpression": false,
|
||||
"asc": true,
|
||||
"nulls": "last"
|
||||
}
|
||||
],
|
||||
"isUnique": false,
|
||||
"where": "is_processed = false",
|
||||
"concurrently": false,
|
||||
"method": "btree",
|
||||
"with": {}
|
||||
}
|
||||
},
|
||||
"foreignKeys": {
|
||||
"account_deletion_request_user_id_user_id_fk": {
|
||||
"name": "account_deletion_request_user_id_user_id_fk",
|
||||
"tableFrom": "account_deletion_request",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {
|
||||
"account_deletion_request_user_id_unique": {
|
||||
"name": "account_deletion_request_user_id_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"user_id"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"public.coin": {
|
||||
"name": "coin",
|
||||
"schema": "",
|
||||
|
|
@ -130,6 +247,12 @@
|
|||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"icon": {
|
||||
"name": "icon",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"creator_id": {
|
||||
"name": "creator_id",
|
||||
"type": "integer",
|
||||
|
|
@ -138,55 +261,55 @@
|
|||
},
|
||||
"initial_supply": {
|
||||
"name": "initial_supply",
|
||||
"type": "numeric(28, 8)",
|
||||
"type": "numeric(30, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"circulating_supply": {
|
||||
"name": "circulating_supply",
|
||||
"type": "numeric(28, 8)",
|
||||
"type": "numeric(30, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"current_price": {
|
||||
"name": "current_price",
|
||||
"type": "numeric(19, 8)",
|
||||
"type": "numeric(20, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"market_cap": {
|
||||
"name": "market_cap",
|
||||
"type": "numeric(28, 4)",
|
||||
"type": "numeric(30, 2)",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"volume_24h": {
|
||||
"name": "volume_24h",
|
||||
"type": "numeric(28, 4)",
|
||||
"type": "numeric(30, 2)",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"default": "'0.0000'"
|
||||
"default": "'0.00'"
|
||||
},
|
||||
"change_24h": {
|
||||
"name": "change_24h",
|
||||
"type": "numeric(8, 4)",
|
||||
"type": "numeric(10, 4)",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"default": "'0.0000'"
|
||||
},
|
||||
"pool_coin_amount": {
|
||||
"name": "pool_coin_amount",
|
||||
"type": "numeric(28, 8)",
|
||||
"type": "numeric(30, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "'0.00000000'"
|
||||
},
|
||||
"pool_base_currency_amount": {
|
||||
"name": "pool_base_currency_amount",
|
||||
"type": "numeric(28, 4)",
|
||||
"type": "numeric(30, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "'0.0000'"
|
||||
"default": "'0.00000000'"
|
||||
},
|
||||
"created_at": {
|
||||
"name": "created_at",
|
||||
|
|
@ -237,6 +360,491 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"public.comment": {
|
||||
"name": "comment",
|
||||
"schema": "",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
"type": "serial",
|
||||
"primaryKey": true,
|
||||
"notNull": true
|
||||
},
|
||||
"user_id": {
|
||||
"name": "user_id",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"coin_id": {
|
||||
"name": "coin_id",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"content": {
|
||||
"name": "content",
|
||||
"type": "varchar(500)",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"likes_count": {
|
||||
"name": "likes_count",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": 0
|
||||
},
|
||||
"created_at": {
|
||||
"name": "created_at",
|
||||
"type": "timestamp with time zone",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "now()"
|
||||
},
|
||||
"updated_at": {
|
||||
"name": "updated_at",
|
||||
"type": "timestamp with time zone",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "now()"
|
||||
},
|
||||
"is_deleted": {
|
||||
"name": "is_deleted",
|
||||
"type": "boolean",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"comment_user_id_idx": {
|
||||
"name": "comment_user_id_idx",
|
||||
"columns": [
|
||||
{
|
||||
"expression": "user_id",
|
||||
"isExpression": false,
|
||||
"asc": true,
|
||||
"nulls": "last"
|
||||
}
|
||||
],
|
||||
"isUnique": false,
|
||||
"concurrently": false,
|
||||
"method": "btree",
|
||||
"with": {}
|
||||
},
|
||||
"comment_coin_id_idx": {
|
||||
"name": "comment_coin_id_idx",
|
||||
"columns": [
|
||||
{
|
||||
"expression": "coin_id",
|
||||
"isExpression": false,
|
||||
"asc": true,
|
||||
"nulls": "last"
|
||||
}
|
||||
],
|
||||
"isUnique": false,
|
||||
"concurrently": false,
|
||||
"method": "btree",
|
||||
"with": {}
|
||||
}
|
||||
},
|
||||
"foreignKeys": {
|
||||
"comment_user_id_user_id_fk": {
|
||||
"name": "comment_user_id_user_id_fk",
|
||||
"tableFrom": "comment",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "set null",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
"comment_coin_id_coin_id_fk": {
|
||||
"name": "comment_coin_id_coin_id_fk",
|
||||
"tableFrom": "comment",
|
||||
"tableTo": "coin",
|
||||
"columnsFrom": [
|
||||
"coin_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {}
|
||||
},
|
||||
"public.comment_like": {
|
||||
"name": "comment_like",
|
||||
"schema": "",
|
||||
"columns": {
|
||||
"user_id": {
|
||||
"name": "user_id",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"comment_id": {
|
||||
"name": "comment_id",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"created_at": {
|
||||
"name": "created_at",
|
||||
"type": "timestamp with time zone",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "now()"
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
"foreignKeys": {
|
||||
"comment_like_user_id_user_id_fk": {
|
||||
"name": "comment_like_user_id_user_id_fk",
|
||||
"tableFrom": "comment_like",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
"comment_like_comment_id_comment_id_fk": {
|
||||
"name": "comment_like_comment_id_comment_id_fk",
|
||||
"tableFrom": "comment_like",
|
||||
"tableTo": "comment",
|
||||
"columnsFrom": [
|
||||
"comment_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
},
|
||||
"compositePrimaryKeys": {
|
||||
"comment_like_user_id_comment_id_pk": {
|
||||
"name": "comment_like_user_id_comment_id_pk",
|
||||
"columns": [
|
||||
"user_id",
|
||||
"comment_id"
|
||||
]
|
||||
}
|
||||
},
|
||||
"uniqueConstraints": {}
|
||||
},
|
||||
"public.prediction_bet": {
|
||||
"name": "prediction_bet",
|
||||
"schema": "",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
"type": "serial",
|
||||
"primaryKey": true,
|
||||
"notNull": true
|
||||
},
|
||||
"user_id": {
|
||||
"name": "user_id",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"question_id": {
|
||||
"name": "question_id",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"side": {
|
||||
"name": "side",
|
||||
"type": "boolean",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"amount": {
|
||||
"name": "amount",
|
||||
"type": "numeric(20, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"actual_winnings": {
|
||||
"name": "actual_winnings",
|
||||
"type": "numeric(20, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"created_at": {
|
||||
"name": "created_at",
|
||||
"type": "timestamp with time zone",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "now()"
|
||||
},
|
||||
"settled_at": {
|
||||
"name": "settled_at",
|
||||
"type": "timestamp with time zone",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"prediction_bet_user_id_idx": {
|
||||
"name": "prediction_bet_user_id_idx",
|
||||
"columns": [
|
||||
{
|
||||
"expression": "user_id",
|
||||
"isExpression": false,
|
||||
"asc": true,
|
||||
"nulls": "last"
|
||||
}
|
||||
],
|
||||
"isUnique": false,
|
||||
"concurrently": false,
|
||||
"method": "btree",
|
||||
"with": {}
|
||||
},
|
||||
"prediction_bet_question_id_idx": {
|
||||
"name": "prediction_bet_question_id_idx",
|
||||
"columns": [
|
||||
{
|
||||
"expression": "question_id",
|
||||
"isExpression": false,
|
||||
"asc": true,
|
||||
"nulls": "last"
|
||||
}
|
||||
],
|
||||
"isUnique": false,
|
||||
"concurrently": false,
|
||||
"method": "btree",
|
||||
"with": {}
|
||||
},
|
||||
"prediction_bet_user_question_idx": {
|
||||
"name": "prediction_bet_user_question_idx",
|
||||
"columns": [
|
||||
{
|
||||
"expression": "user_id",
|
||||
"isExpression": false,
|
||||
"asc": true,
|
||||
"nulls": "last"
|
||||
},
|
||||
{
|
||||
"expression": "question_id",
|
||||
"isExpression": false,
|
||||
"asc": true,
|
||||
"nulls": "last"
|
||||
}
|
||||
],
|
||||
"isUnique": false,
|
||||
"concurrently": false,
|
||||
"method": "btree",
|
||||
"with": {}
|
||||
},
|
||||
"prediction_bet_created_at_idx": {
|
||||
"name": "prediction_bet_created_at_idx",
|
||||
"columns": [
|
||||
{
|
||||
"expression": "created_at",
|
||||
"isExpression": false,
|
||||
"asc": true,
|
||||
"nulls": "last"
|
||||
}
|
||||
],
|
||||
"isUnique": false,
|
||||
"concurrently": false,
|
||||
"method": "btree",
|
||||
"with": {}
|
||||
}
|
||||
},
|
||||
"foreignKeys": {
|
||||
"prediction_bet_user_id_user_id_fk": {
|
||||
"name": "prediction_bet_user_id_user_id_fk",
|
||||
"tableFrom": "prediction_bet",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "set null",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
"prediction_bet_question_id_prediction_question_id_fk": {
|
||||
"name": "prediction_bet_question_id_prediction_question_id_fk",
|
||||
"tableFrom": "prediction_bet",
|
||||
"tableTo": "prediction_question",
|
||||
"columnsFrom": [
|
||||
"question_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {}
|
||||
},
|
||||
"public.prediction_question": {
|
||||
"name": "prediction_question",
|
||||
"schema": "",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
"type": "serial",
|
||||
"primaryKey": true,
|
||||
"notNull": true
|
||||
},
|
||||
"creator_id": {
|
||||
"name": "creator_id",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"question": {
|
||||
"name": "question",
|
||||
"type": "varchar(200)",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"status": {
|
||||
"name": "status",
|
||||
"type": "prediction_market_status",
|
||||
"typeSchema": "public",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "'ACTIVE'"
|
||||
},
|
||||
"resolution_date": {
|
||||
"name": "resolution_date",
|
||||
"type": "timestamp with time zone",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"ai_resolution": {
|
||||
"name": "ai_resolution",
|
||||
"type": "boolean",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"total_yes_amount": {
|
||||
"name": "total_yes_amount",
|
||||
"type": "numeric(20, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "'0.00000000'"
|
||||
},
|
||||
"total_no_amount": {
|
||||
"name": "total_no_amount",
|
||||
"type": "numeric(20, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "'0.00000000'"
|
||||
},
|
||||
"created_at": {
|
||||
"name": "created_at",
|
||||
"type": "timestamp with time zone",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "now()"
|
||||
},
|
||||
"resolved_at": {
|
||||
"name": "resolved_at",
|
||||
"type": "timestamp with time zone",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"requires_web_search": {
|
||||
"name": "requires_web_search",
|
||||
"type": "boolean",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": false
|
||||
},
|
||||
"validation_reason": {
|
||||
"name": "validation_reason",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"prediction_question_creator_id_idx": {
|
||||
"name": "prediction_question_creator_id_idx",
|
||||
"columns": [
|
||||
{
|
||||
"expression": "creator_id",
|
||||
"isExpression": false,
|
||||
"asc": true,
|
||||
"nulls": "last"
|
||||
}
|
||||
],
|
||||
"isUnique": false,
|
||||
"concurrently": false,
|
||||
"method": "btree",
|
||||
"with": {}
|
||||
},
|
||||
"prediction_question_status_idx": {
|
||||
"name": "prediction_question_status_idx",
|
||||
"columns": [
|
||||
{
|
||||
"expression": "status",
|
||||
"isExpression": false,
|
||||
"asc": true,
|
||||
"nulls": "last"
|
||||
}
|
||||
],
|
||||
"isUnique": false,
|
||||
"concurrently": false,
|
||||
"method": "btree",
|
||||
"with": {}
|
||||
},
|
||||
"prediction_question_resolution_date_idx": {
|
||||
"name": "prediction_question_resolution_date_idx",
|
||||
"columns": [
|
||||
{
|
||||
"expression": "resolution_date",
|
||||
"isExpression": false,
|
||||
"asc": true,
|
||||
"nulls": "last"
|
||||
}
|
||||
],
|
||||
"isUnique": false,
|
||||
"concurrently": false,
|
||||
"method": "btree",
|
||||
"with": {}
|
||||
}
|
||||
},
|
||||
"foreignKeys": {
|
||||
"prediction_question_creator_id_user_id_fk": {
|
||||
"name": "prediction_question_creator_id_user_id_fk",
|
||||
"tableFrom": "prediction_question",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"creator_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "set null",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {}
|
||||
},
|
||||
"public.price_history": {
|
||||
"name": "price_history",
|
||||
"schema": "",
|
||||
|
|
@ -255,7 +863,7 @@
|
|||
},
|
||||
"price": {
|
||||
"name": "price",
|
||||
"type": "numeric(19, 8)",
|
||||
"type": "numeric(20, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
|
|
@ -286,6 +894,171 @@
|
|||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {}
|
||||
},
|
||||
"public.promo_code": {
|
||||
"name": "promo_code",
|
||||
"schema": "",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
"type": "serial",
|
||||
"primaryKey": true,
|
||||
"notNull": true
|
||||
},
|
||||
"code": {
|
||||
"name": "code",
|
||||
"type": "varchar(50)",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"reward_amount": {
|
||||
"name": "reward_amount",
|
||||
"type": "numeric(20, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"max_uses": {
|
||||
"name": "max_uses",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"is_active": {
|
||||
"name": "is_active",
|
||||
"type": "boolean",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": true
|
||||
},
|
||||
"expires_at": {
|
||||
"name": "expires_at",
|
||||
"type": "timestamp with time zone",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"created_at": {
|
||||
"name": "created_at",
|
||||
"type": "timestamp with time zone",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "now()"
|
||||
},
|
||||
"created_by": {
|
||||
"name": "created_by",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
"foreignKeys": {
|
||||
"promo_code_created_by_user_id_fk": {
|
||||
"name": "promo_code_created_by_user_id_fk",
|
||||
"tableFrom": "promo_code",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"created_by"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "set null",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {
|
||||
"promo_code_code_unique": {
|
||||
"name": "promo_code_code_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"code"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"public.promo_code_redemption": {
|
||||
"name": "promo_code_redemption",
|
||||
"schema": "",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
"type": "serial",
|
||||
"primaryKey": true,
|
||||
"notNull": true
|
||||
},
|
||||
"user_id": {
|
||||
"name": "user_id",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"promo_code_id": {
|
||||
"name": "promo_code_id",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"reward_amount": {
|
||||
"name": "reward_amount",
|
||||
"type": "numeric(20, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"redeemed_at": {
|
||||
"name": "redeemed_at",
|
||||
"type": "timestamp with time zone",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "now()"
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
"foreignKeys": {
|
||||
"promo_code_redemption_user_id_user_id_fk": {
|
||||
"name": "promo_code_redemption_user_id_user_id_fk",
|
||||
"tableFrom": "promo_code_redemption",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
"promo_code_redemption_promo_code_id_promo_code_id_fk": {
|
||||
"name": "promo_code_redemption_promo_code_id_promo_code_id_fk",
|
||||
"tableFrom": "promo_code_redemption",
|
||||
"tableTo": "promo_code",
|
||||
"columnsFrom": [
|
||||
"promo_code_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "no action",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {
|
||||
"promo_code_redemption_user_id_promo_code_id_unique": {
|
||||
"name": "promo_code_redemption_user_id_promo_code_id_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"user_id",
|
||||
"promo_code_id"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"public.session": {
|
||||
"name": "session",
|
||||
"schema": "",
|
||||
|
|
@ -382,7 +1155,7 @@
|
|||
"name": "user_id",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
"notNull": false
|
||||
},
|
||||
"coin_id": {
|
||||
"name": "coin_id",
|
||||
|
|
@ -399,19 +1172,19 @@
|
|||
},
|
||||
"quantity": {
|
||||
"name": "quantity",
|
||||
"type": "numeric(28, 8)",
|
||||
"type": "numeric(30, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"price_per_coin": {
|
||||
"name": "price_per_coin",
|
||||
"type": "numeric(19, 8)",
|
||||
"type": "numeric(20, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"total_base_currency_amount": {
|
||||
"name": "total_base_currency_amount",
|
||||
"type": "numeric(28, 4)",
|
||||
"type": "numeric(30, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
|
|
@ -435,7 +1208,7 @@
|
|||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "cascade",
|
||||
"onDelete": "set null",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
"transaction_coin_id_coin_id_fk": {
|
||||
|
|
@ -526,10 +1299,10 @@
|
|||
},
|
||||
"base_currency_balance": {
|
||||
"name": "base_currency_balance",
|
||||
"type": "numeric(19, 4)",
|
||||
"type": "numeric(20, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "'10000.0000'"
|
||||
"default": "'100.00000000'"
|
||||
},
|
||||
"bio": {
|
||||
"name": "bio",
|
||||
|
|
@ -543,6 +1316,40 @@
|
|||
"type": "varchar(30)",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"volume_master": {
|
||||
"name": "volume_master",
|
||||
"type": "numeric(3, 2)",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "'0.70'"
|
||||
},
|
||||
"volume_muted": {
|
||||
"name": "volume_muted",
|
||||
"type": "boolean",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": false
|
||||
},
|
||||
"last_reward_claim": {
|
||||
"name": "last_reward_claim",
|
||||
"type": "timestamp with time zone",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"total_rewards_claimed": {
|
||||
"name": "total_rewards_claimed",
|
||||
"type": "numeric(20, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "'0.00000000'"
|
||||
},
|
||||
"login_streak": {
|
||||
"name": "login_streak",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": 0
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
|
|
@ -583,7 +1390,7 @@
|
|||
},
|
||||
"quantity": {
|
||||
"name": "quantity",
|
||||
"type": "numeric(28, 8)",
|
||||
"type": "numeric(30, 8)",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
|
|
@ -685,6 +1492,15 @@
|
|||
}
|
||||
},
|
||||
"enums": {
|
||||
"public.prediction_market_status": {
|
||||
"name": "prediction_market_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"ACTIVE",
|
||||
"RESOLVED",
|
||||
"CANCELLED"
|
||||
]
|
||||
},
|
||||
"public.transaction_type": {
|
||||
"name": "transaction_type",
|
||||
"schema": "public",
|
||||
|
|
|
|||
Reference in a new issue