This repository has been archived on 2025-08-19. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
coinstorge/website/drizzle/meta/0000_snapshot.json

703 lines
18 KiB
JSON
Raw Normal View History

2025-05-22 13:17:11 +03:00
{
"id": "75ce764f-a039-4e66-9ebb-620e13d1fa85",
2025-05-22 13:17:11 +03:00
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.account": {
"name": "account",
"schema": "",
"columns": {
"id": {
"name": "id",
2025-05-22 14:37:19 +03:00
"type": "serial",
2025-05-22 13:17:11 +03:00
"primaryKey": true,
"notNull": true
},
"account_id": {
"name": "account_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"provider_id": {
"name": "provider_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
2025-05-22 14:37:19 +03:00
"type": "integer",
2025-05-22 13:17:11 +03:00
"primaryKey": false,
"notNull": true
},
"access_token": {
"name": "access_token",
"type": "text",
"primaryKey": false,
"notNull": false
},
"refresh_token": {
"name": "refresh_token",
"type": "text",
"primaryKey": false,
"notNull": false
},
"id_token": {
"name": "id_token",
"type": "text",
"primaryKey": false,
"notNull": false
},
"access_token_expires_at": {
"name": "access_token_expires_at",
"type": "timestamp with time zone",
2025-05-22 13:17:11 +03:00
"primaryKey": false,
"notNull": false
},
"refresh_token_expires_at": {
"name": "refresh_token_expires_at",
"type": "timestamp with time zone",
2025-05-22 13:17:11 +03:00
"primaryKey": false,
"notNull": false
},
"scope": {
"name": "scope",
"type": "text",
"primaryKey": false,
"notNull": false
},
"password": {
"name": "password",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
2025-05-22 13:17:11 +03:00
"primaryKey": false,
"notNull": true,
"default": "now()"
2025-05-22 13:17:11 +03:00
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
2025-05-22 13:17:11 +03:00
"primaryKey": false,
"notNull": true,
"default": "now()"
2025-05-22 13:17:11 +03:00
}
},
"indexes": {},
"foreignKeys": {
"account_user_id_user_id_fk": {
"name": "account_user_id_user_id_fk",
"tableFrom": "account",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"public.coin": {
"name": "coin",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"name": {
"name": "name",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"symbol": {
"name": "symbol",
"type": "varchar(10)",
"primaryKey": false,
"notNull": true
},
"creator_id": {
"name": "creator_id",
2025-05-22 14:37:19 +03:00
"type": "integer",
"primaryKey": false,
2025-05-22 14:37:19 +03:00
"notNull": false
},
"initial_supply": {
"name": "initial_supply",
"type": "numeric(28, 8)",
"primaryKey": false,
"notNull": true
},
"circulating_supply": {
"name": "circulating_supply",
"type": "numeric(28, 8)",
"primaryKey": false,
"notNull": true
},
"current_price": {
"name": "current_price",
"type": "numeric(19, 8)",
"primaryKey": false,
"notNull": true
},
"market_cap": {
"name": "market_cap",
"type": "numeric(28, 4)",
"primaryKey": false,
"notNull": true
},
"volume_24h": {
"name": "volume_24h",
"type": "numeric(28, 4)",
"primaryKey": false,
"notNull": false,
"default": "'0.0000'"
},
"change_24h": {
"name": "change_24h",
"type": "numeric(8, 4)",
"primaryKey": false,
"notNull": false,
"default": "'0.0000'"
},
"pool_coin_amount": {
"name": "pool_coin_amount",
"type": "numeric(28, 8)",
"primaryKey": false,
"notNull": true,
"default": "'0.00000000'"
},
"pool_base_currency_amount": {
"name": "pool_base_currency_amount",
"type": "numeric(28, 4)",
"primaryKey": false,
"notNull": true,
"default": "'0.0000'"
},
"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_listed": {
"name": "is_listed",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": true
}
},
"indexes": {},
"foreignKeys": {
"coin_creator_id_user_id_fk": {
"name": "coin_creator_id_user_id_fk",
"tableFrom": "coin",
"tableTo": "user",
"columnsFrom": [
"creator_id"
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"coin_symbol_unique": {
"name": "coin_symbol_unique",
"nullsNotDistinct": false,
"columns": [
"symbol"
]
}
}
},
"public.price_history": {
"name": "price_history",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"coin_id": {
"name": "coin_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"price": {
"name": "price",
"type": "numeric(19, 8)",
"primaryKey": false,
"notNull": true
},
"timestamp": {
"name": "timestamp",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"price_history_coin_id_coin_id_fk": {
"name": "price_history_coin_id_coin_id_fk",
"tableFrom": "price_history",
"tableTo": "coin",
"columnsFrom": [
"coin_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
2025-05-22 13:17:11 +03:00
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"public.session": {
"name": "session",
"schema": "",
"columns": {
"id": {
"name": "id",
2025-05-22 14:37:19 +03:00
"type": "serial",
2025-05-22 13:17:11 +03:00
"primaryKey": true,
"notNull": true
},
"expires_at": {
"name": "expires_at",
"type": "timestamp with time zone",
2025-05-22 13:17:11 +03:00
"primaryKey": false,
"notNull": true
},
"token": {
"name": "token",
"type": "text",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
2025-05-22 13:17:11 +03:00
"primaryKey": false,
"notNull": true,
"default": "now()"
2025-05-22 13:17:11 +03:00
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
2025-05-22 13:17:11 +03:00
"primaryKey": false,
"notNull": true,
"default": "now()"
2025-05-22 13:17:11 +03:00
},
"ip_address": {
"name": "ip_address",
"type": "text",
"primaryKey": false,
"notNull": false
},
"user_agent": {
"name": "user_agent",
"type": "text",
"primaryKey": false,
"notNull": false
},
"user_id": {
"name": "user_id",
2025-05-22 14:37:19 +03:00
"type": "integer",
2025-05-22 13:17:11 +03:00
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"session_user_id_user_id_fk": {
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
2025-05-22 13:17:11 +03:00
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"session_token_unique": {
"name": "session_token_unique",
"nullsNotDistinct": false,
"columns": [
"token"
]
}
}
},
"public.transaction": {
"name": "transaction",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"user_id": {
"name": "user_id",
2025-05-22 14:37:19 +03:00
"type": "integer",
"primaryKey": false,
"notNull": true
},
"coin_id": {
"name": "coin_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"type": {
"name": "type",
"type": "transaction_type",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"quantity": {
"name": "quantity",
"type": "numeric(28, 8)",
"primaryKey": false,
"notNull": true
},
"price_per_coin": {
"name": "price_per_coin",
"type": "numeric(19, 8)",
"primaryKey": false,
"notNull": true
},
"total_base_currency_amount": {
"name": "total_base_currency_amount",
"type": "numeric(28, 4)",
"primaryKey": false,
"notNull": true
},
"timestamp": {
"name": "timestamp",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"transaction_user_id_user_id_fk": {
"name": "transaction_user_id_user_id_fk",
"tableFrom": "transaction",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"transaction_coin_id_coin_id_fk": {
"name": "transaction_coin_id_coin_id_fk",
"tableFrom": "transaction",
"tableTo": "coin",
"columnsFrom": [
"coin_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
2025-05-22 13:17:11 +03:00
"public.user": {
"name": "user",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
2025-05-22 13:17:11 +03:00
"primaryKey": true,
"notNull": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"email": {
"name": "email",
"type": "text",
"primaryKey": false,
"notNull": true
},
"email_verified": {
"name": "email_verified",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
2025-05-22 13:17:11 +03:00
},
"image": {
"name": "image",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
2025-05-22 13:17:11 +03:00
"primaryKey": false,
"notNull": true,
"default": "now()"
2025-05-22 13:17:11 +03:00
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
2025-05-22 13:17:11 +03:00
"primaryKey": false,
"notNull": true,
"default": "now()"
2025-05-22 13:17:11 +03:00
},
"is_admin": {
"name": "is_admin",
"type": "boolean",
"primaryKey": false,
"notNull": false,
"default": false
2025-05-22 13:17:11 +03:00
},
"is_banned": {
"name": "is_banned",
"type": "boolean",
"primaryKey": false,
"notNull": false,
"default": false
2025-05-22 13:17:11 +03:00
},
"ban_reason": {
"name": "ban_reason",
"type": "text",
"primaryKey": false,
"notNull": false
},
"base_currency_balance": {
"name": "base_currency_balance",
"type": "numeric(19, 4)",
"primaryKey": false,
"notNull": true,
"default": "'10000.0000'"
},
"bio": {
"name": "bio",
"type": "varchar(160)",
"primaryKey": false,
"notNull": false,
"default": "'Hello am 48 year old man from somalia. Sorry for my bed england. I selled my wife for internet connection for play “conter stirk”'"
},
"username": {
"name": "username",
"type": "varchar(30)",
"primaryKey": false,
"notNull": true
2025-05-22 13:17:11 +03:00
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"user_email_unique": {
"name": "user_email_unique",
"nullsNotDistinct": false,
"columns": [
"email"
]
},
"user_username_unique": {
"name": "user_username_unique",
"nullsNotDistinct": false,
"columns": [
"username"
]
2025-05-22 13:17:11 +03:00
}
}
},
"public.user_portfolio": {
"name": "user_portfolio",
"schema": "",
"columns": {
"user_id": {
"name": "user_id",
2025-05-22 14:37:19 +03:00
"type": "integer",
"primaryKey": false,
"notNull": true
},
"coin_id": {
"name": "coin_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"quantity": {
"name": "quantity",
"type": "numeric(28, 8)",
"primaryKey": false,
"notNull": true
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"user_portfolio_user_id_user_id_fk": {
"name": "user_portfolio_user_id_user_id_fk",
"tableFrom": "user_portfolio",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"user_portfolio_coin_id_coin_id_fk": {
"name": "user_portfolio_coin_id_coin_id_fk",
"tableFrom": "user_portfolio",
"tableTo": "coin",
"columnsFrom": [
"coin_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"user_portfolio_user_id_coin_id_pk": {
"name": "user_portfolio_user_id_coin_id_pk",
"columns": [
"user_id",
"coin_id"
]
}
},
"uniqueConstraints": {}
},
2025-05-22 13:17:11 +03:00
"public.verification": {
"name": "verification",
"schema": "",
"columns": {
"id": {
"name": "id",
2025-05-22 14:37:19 +03:00
"type": "serial",
2025-05-22 13:17:11 +03:00
"primaryKey": true,
"notNull": true
},
"identifier": {
"name": "identifier",
"type": "text",
"primaryKey": false,
"notNull": true
},
"value": {
"name": "value",
"type": "text",
"primaryKey": false,
"notNull": true
},
"expires_at": {
"name": "expires_at",
"type": "timestamp with time zone",
2025-05-22 13:17:11 +03:00
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
2025-05-22 13:17:11 +03:00
"primaryKey": false,
"notNull": false,
"default": "now()"
2025-05-22 13:17:11 +03:00
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
2025-05-22 13:17:11 +03:00
"primaryKey": false,
"notNull": false,
"default": "now()"
2025-05-22 13:17:11 +03:00
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
}
},
"enums": {
"public.transaction_type": {
"name": "transaction_type",
"schema": "public",
"values": [
"BUY",
"SELL"
]
}
},
2025-05-22 13:17:11 +03:00
"schemas": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}