Files
esports/drizzle/meta/0001_snapshot.json
2026-03-13 14:30:06 -04:00

1806 lines
45 KiB
JSON

{
"id": "f27c8b9e-e9d6-47af-95aa-0014d9a77581",
"prevId": "2a33222f-3ef2-41cd-9454-eacae15729f6",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.mappool": {
"name": "mappool",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"created_by": {
"name": "created_by",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"verified_at": {
"name": "verified_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.mappool_slot": {
"name": "mappool_slot",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"mappool_id": {
"name": "mappool_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"category": {
"name": "category",
"type": "text",
"primaryKey": false,
"notNull": true
},
"order_in_category": {
"name": "order_in_category",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"beatmap_id": {
"name": "beatmap_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"star_rating": {
"name": "star_rating",
"type": "real",
"primaryKey": false,
"notNull": false
},
"bpm": {
"name": "bpm",
"type": "real",
"primaryKey": false,
"notNull": false
},
"total_length": {
"name": "total_length",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"mods": {
"name": "mods",
"type": "text[]",
"primaryKey": false,
"notNull": true,
"default": "'{}'"
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": false
},
"artist": {
"name": "artist",
"type": "text",
"primaryKey": false,
"notNull": false
},
"version": {
"name": "version",
"type": "text",
"primaryKey": false,
"notNull": false
},
"cover_url": {
"name": "cover_url",
"type": "text",
"primaryKey": false,
"notNull": false
},
"list_cover_url": {
"name": "list_cover_url",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"idx_mappool_slot_mappool": {
"name": "idx_mappool_slot_mappool",
"columns": [
{
"expression": "mappool_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"mappool_slot_mappool_id_mappool_id_fk": {
"name": "mappool_slot_mappool_id_mappool_id_fk",
"tableFrom": "mappool_slot",
"tableTo": "mappool",
"columnsFrom": [
"mappool_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.match": {
"name": "match",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": false
},
"state": {
"name": "state",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'CREATED'"
},
"config": {
"name": "config",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"mappool_id": {
"name": "mappool_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"osu_lobby_id": {
"name": "osu_lobby_id",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"scheduled_at": {
"name": "scheduled_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"started_at": {
"name": "started_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"finished_at": {
"name": "finished_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"winner_id": {
"name": "winner_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"created_by": {
"name": "created_by",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"idx_match_state": {
"name": "idx_match_state",
"columns": [
{
"expression": "state",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_match_created_at": {
"name": "idx_match_created_at",
"columns": [
{
"expression": "created_at",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"match_mappool_id_mappool_id_fk": {
"name": "match_mappool_id_mappool_id_fk",
"tableFrom": "match",
"tableTo": "mappool",
"columnsFrom": [
"mappool_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"match_winner_id_team_id_fk": {
"name": "match_winner_id_team_id_fk",
"tableFrom": "match",
"tableTo": "team",
"columnsFrom": [
"winner_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.match_game": {
"name": "match_game",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"match_id": {
"name": "match_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"game_number": {
"name": "game_number",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"mappool_slot_id": {
"name": "mappool_slot_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"picked_by_participant_id": {
"name": "picked_by_participant_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"winner_participant_id": {
"name": "winner_participant_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"state": {
"name": "state",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'PENDING'"
},
"started_at": {
"name": "started_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"finished_at": {
"name": "finished_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"idx_match_game_match": {
"name": "idx_match_game_match",
"columns": [
{
"expression": "match_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"match_game_match_id_match_id_fk": {
"name": "match_game_match_id_match_id_fk",
"tableFrom": "match_game",
"tableTo": "match",
"columnsFrom": [
"match_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"match_game_mappool_slot_id_mappool_slot_id_fk": {
"name": "match_game_mappool_slot_id_mappool_slot_id_fk",
"tableFrom": "match_game",
"tableTo": "mappool_slot",
"columnsFrom": [
"mappool_slot_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"match_game_picked_by_participant_id_match_participant_id_fk": {
"name": "match_game_picked_by_participant_id_match_participant_id_fk",
"tableFrom": "match_game",
"tableTo": "match_participant",
"columnsFrom": [
"picked_by_participant_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"match_game_winner_participant_id_match_participant_id_fk": {
"name": "match_game_winner_participant_id_match_participant_id_fk",
"tableFrom": "match_game",
"tableTo": "match_participant",
"columnsFrom": [
"winner_participant_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.match_game_score": {
"name": "match_game_score",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"match_game_id": {
"name": "match_game_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"player_id": {
"name": "player_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"score": {
"name": "score",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"accuracy": {
"name": "accuracy",
"type": "real",
"primaryKey": false,
"notNull": true,
"default": 0
},
"max_combo": {
"name": "max_combo",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"count_300": {
"name": "count_300",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"count_100": {
"name": "count_100",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"count_50": {
"name": "count_50",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"count_miss": {
"name": "count_miss",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"mods": {
"name": "mods",
"type": "text[]",
"primaryKey": false,
"notNull": true,
"default": "'{}'"
},
"passed": {
"name": "passed",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"pp": {
"name": "pp",
"type": "real",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"idx_mgs_game": {
"name": "idx_mgs_game",
"columns": [
{
"expression": "match_game_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"match_game_score_match_game_id_match_game_id_fk": {
"name": "match_game_score_match_game_id_match_game_id_fk",
"tableFrom": "match_game_score",
"tableTo": "match_game",
"columnsFrom": [
"match_game_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"match_game_score_player_id_match_participant_player_id_fk": {
"name": "match_game_score_player_id_match_participant_player_id_fk",
"tableFrom": "match_game_score",
"tableTo": "match_participant_player",
"columnsFrom": [
"player_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.match_invite": {
"name": "match_invite",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"created_by": {
"name": "created_by",
"type": "text",
"primaryKey": false,
"notNull": true
},
"creator_team_id": {
"name": "creator_team_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"invited_team_id": {
"name": "invited_team_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"config": {
"name": "config",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"mappool_id": {
"name": "mappool_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": false
},
"message": {
"name": "message",
"type": "text",
"primaryKey": false,
"notNull": false
},
"scheduled_at": {
"name": "scheduled_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"expires_at": {
"name": "expires_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'pending'"
},
"match_id": {
"name": "match_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"responded_at": {
"name": "responded_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()"
}
},
"indexes": {
"idx_invite_invited_team": {
"name": "idx_invite_invited_team",
"columns": [
{
"expression": "invited_team_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_invite_created_by": {
"name": "idx_invite_created_by",
"columns": [
{
"expression": "created_by",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_invite_status": {
"name": "idx_invite_status",
"columns": [
{
"expression": "status",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"match_invite_creator_team_id_team_id_fk": {
"name": "match_invite_creator_team_id_team_id_fk",
"tableFrom": "match_invite",
"tableTo": "team",
"columnsFrom": [
"creator_team_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"match_invite_invited_team_id_team_id_fk": {
"name": "match_invite_invited_team_id_team_id_fk",
"tableFrom": "match_invite",
"tableTo": "team",
"columnsFrom": [
"invited_team_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"match_invite_mappool_id_mappool_id_fk": {
"name": "match_invite_mappool_id_mappool_id_fk",
"tableFrom": "match_invite",
"tableTo": "mappool",
"columnsFrom": [
"mappool_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"match_invite_match_id_match_id_fk": {
"name": "match_invite_match_id_match_id_fk",
"tableFrom": "match_invite",
"tableTo": "match",
"columnsFrom": [
"match_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.match_participant": {
"name": "match_participant",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"match_id": {
"name": "match_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"team_id": {
"name": "team_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"slot": {
"name": "slot",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"score": {
"name": "score",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"roll_value": {
"name": "roll_value",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"pick_order": {
"name": "pick_order",
"type": "integer",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"idx_mp_match_team": {
"name": "idx_mp_match_team",
"columns": [
{
"expression": "match_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "team_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_mp_match_slot": {
"name": "idx_mp_match_slot",
"columns": [
{
"expression": "match_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "slot",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_mp_match": {
"name": "idx_mp_match",
"columns": [
{
"expression": "match_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"match_participant_match_id_match_id_fk": {
"name": "match_participant_match_id_match_id_fk",
"tableFrom": "match_participant",
"tableTo": "match",
"columnsFrom": [
"match_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"match_participant_team_id_team_id_fk": {
"name": "match_participant_team_id_team_id_fk",
"tableFrom": "match_participant",
"tableTo": "team",
"columnsFrom": [
"team_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.match_participant_player": {
"name": "match_participant_player",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"participant_id": {
"name": "participant_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"idx_mpp_participant_user": {
"name": "idx_mpp_participant_user",
"columns": [
{
"expression": "participant_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_mpp_participant": {
"name": "idx_mpp_participant",
"columns": [
{
"expression": "participant_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_mpp_user": {
"name": "idx_mpp_user",
"columns": [
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"match_participant_player_participant_id_match_participant_id_fk": {
"name": "match_participant_player_participant_id_match_participant_id_fk",
"tableFrom": "match_participant_player",
"tableTo": "match_participant",
"columnsFrom": [
"participant_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.match_queue": {
"name": "match_queue",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"team_id": {
"name": "team_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"elo": {
"name": "elo",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 1000
},
"joined_at": {
"name": "joined_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"idx_queue_user": {
"name": "idx_queue_user",
"columns": [
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_queue_elo": {
"name": "idx_queue_elo",
"columns": [
{
"expression": "elo",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"match_queue_team_id_team_id_fk": {
"name": "match_queue_team_id_team_id_fk",
"tableFrom": "match_queue",
"tableTo": "team",
"columnsFrom": [
"team_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.notification": {
"name": "notification",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"type": {
"name": "type",
"type": "text",
"primaryKey": false,
"notNull": true
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true
},
"message": {
"name": "message",
"type": "text",
"primaryKey": false,
"notNull": false
},
"reference_id": {
"name": "reference_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"read": {
"name": "read",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"actioned_at": {
"name": "actioned_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()"
}
},
"indexes": {
"idx_notification_user": {
"name": "idx_notification_user",
"columns": [
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_notification_user_read": {
"name": "idx_notification_user_read",
"columns": [
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "read",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.player_rating": {
"name": "player_rating",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"elo": {
"name": "elo",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 1000
},
"wins": {
"name": "wins",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"losses": {
"name": "losses",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"initial_elo": {
"name": "initial_elo",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"osu_rank_at_seed": {
"name": "osu_rank_at_seed",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"player_rating_user_id_unique": {
"name": "player_rating_user_id_unique",
"nullsNotDistinct": false,
"columns": [
"user_id"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.team": {
"name": "team",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"is_personal": {
"name": "is_personal",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"owner_id": {
"name": "owner_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"avatar_url": {
"name": "avatar_url",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.team_member": {
"name": "team_member",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"team_id": {
"name": "team_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"role": {
"name": "role",
"type": "text",
"primaryKey": false,
"notNull": false,
"default": "'member'"
},
"joined_at": {
"name": "joined_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"team_member_team_id_team_id_fk": {
"name": "team_member_team_id_team_id_fk",
"tableFrom": "team_member",
"tableTo": "team",
"columnsFrom": [
"team_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.account": {
"name": "account",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"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",
"type": "text",
"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",
"primaryKey": false,
"notNull": false
},
"refresh_token_expires_at": {
"name": "refresh_token_expires_at",
"type": "timestamp",
"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",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"account_userId_idx": {
"name": "account_userId_idx",
"columns": [
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"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": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.session": {
"name": "session",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"expires_at": {
"name": "expires_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true
},
"token": {
"name": "token",
"type": "text",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true
},
"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",
"type": "text",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"session_userId_idx": {
"name": "session_userId_idx",
"columns": [
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"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",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"session_token_unique": {
"name": "session_token_unique",
"nullsNotDistinct": false,
"columns": [
"token"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.user": {
"name": "user",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"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
},
"image": {
"name": "image",
"type": "text",
"primaryKey": false,
"notNull": false
},
"role": {
"name": "role",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'player'"
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"user_email_unique": {
"name": "user_email_unique",
"nullsNotDistinct": false,
"columns": [
"email"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.verification": {
"name": "verification",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"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",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"verification_identifier_idx": {
"name": "verification_identifier_idx",
"columns": [
{
"expression": "identifier",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {},
"schemas": {},
"sequences": {},
"roles": {},
"policies": {},
"views": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}