1497 lines
38 KiB
JSON
1497 lines
38 KiB
JSON
|
|
{
|
||
|
|
"id": "cd4f4fa3-dc89-4b4e-836e-51d9061454e6",
|
||
|
|
"prevId": "35cf6263-ca97-41f5-88ba-2f62468075b1",
|
||
|
|
"version": "7",
|
||
|
|
"dialect": "postgresql",
|
||
|
|
"tables": {
|
||
|
|
"public.autodraft_settings": {
|
||
|
|
"name": "autodraft_settings",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"season_id": {
|
||
|
|
"name": "season_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"team_id": {
|
||
|
|
"name": "team_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"is_enabled": {
|
||
|
|
"name": "is_enabled",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"mode": {
|
||
|
|
"name": "mode",
|
||
|
|
"type": "autodraft_mode",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'next_pick'"
|
||
|
|
},
|
||
|
|
"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": {
|
||
|
|
"autodraft_settings_season_id_seasons_id_fk": {
|
||
|
|
"name": "autodraft_settings_season_id_seasons_id_fk",
|
||
|
|
"tableFrom": "autodraft_settings",
|
||
|
|
"tableTo": "seasons",
|
||
|
|
"columnsFrom": [
|
||
|
|
"season_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"autodraft_settings_team_id_teams_id_fk": {
|
||
|
|
"name": "autodraft_settings_team_id_teams_id_fk",
|
||
|
|
"tableFrom": "autodraft_settings",
|
||
|
|
"tableTo": "teams",
|
||
|
|
"columnsFrom": [
|
||
|
|
"team_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.commissioners": {
|
||
|
|
"name": "commissioners",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"league_id": {
|
||
|
|
"name": "league_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"user_id": {
|
||
|
|
"name": "user_id",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"commissioners_league_id_leagues_id_fk": {
|
||
|
|
"name": "commissioners_league_id_leagues_id_fk",
|
||
|
|
"tableFrom": "commissioners",
|
||
|
|
"tableTo": "leagues",
|
||
|
|
"columnsFrom": [
|
||
|
|
"league_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.draft_picks": {
|
||
|
|
"name": "draft_picks",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"season_id": {
|
||
|
|
"name": "season_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"team_id": {
|
||
|
|
"name": "team_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"participant_id": {
|
||
|
|
"name": "participant_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"pick_number": {
|
||
|
|
"name": "pick_number",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"round": {
|
||
|
|
"name": "round",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"pick_in_round": {
|
||
|
|
"name": "pick_in_round",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"picked_by_user_id": {
|
||
|
|
"name": "picked_by_user_id",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"picked_by_type": {
|
||
|
|
"name": "picked_by_type",
|
||
|
|
"type": "picked_by_type",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"time_used": {
|
||
|
|
"name": "time_used",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"draft_picks_season_id_seasons_id_fk": {
|
||
|
|
"name": "draft_picks_season_id_seasons_id_fk",
|
||
|
|
"tableFrom": "draft_picks",
|
||
|
|
"tableTo": "seasons",
|
||
|
|
"columnsFrom": [
|
||
|
|
"season_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"draft_picks_team_id_teams_id_fk": {
|
||
|
|
"name": "draft_picks_team_id_teams_id_fk",
|
||
|
|
"tableFrom": "draft_picks",
|
||
|
|
"tableTo": "teams",
|
||
|
|
"columnsFrom": [
|
||
|
|
"team_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"draft_picks_participant_id_participants_id_fk": {
|
||
|
|
"name": "draft_picks_participant_id_participants_id_fk",
|
||
|
|
"tableFrom": "draft_picks",
|
||
|
|
"tableTo": "participants",
|
||
|
|
"columnsFrom": [
|
||
|
|
"participant_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.draft_queue": {
|
||
|
|
"name": "draft_queue",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"season_id": {
|
||
|
|
"name": "season_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"team_id": {
|
||
|
|
"name": "team_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"participant_id": {
|
||
|
|
"name": "participant_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"queue_position": {
|
||
|
|
"name": "queue_position",
|
||
|
|
"type": "integer",
|
||
|
|
"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": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"draft_queue_season_id_seasons_id_fk": {
|
||
|
|
"name": "draft_queue_season_id_seasons_id_fk",
|
||
|
|
"tableFrom": "draft_queue",
|
||
|
|
"tableTo": "seasons",
|
||
|
|
"columnsFrom": [
|
||
|
|
"season_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"draft_queue_team_id_teams_id_fk": {
|
||
|
|
"name": "draft_queue_team_id_teams_id_fk",
|
||
|
|
"tableFrom": "draft_queue",
|
||
|
|
"tableTo": "teams",
|
||
|
|
"columnsFrom": [
|
||
|
|
"team_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"draft_queue_participant_id_participants_id_fk": {
|
||
|
|
"name": "draft_queue_participant_id_participants_id_fk",
|
||
|
|
"tableFrom": "draft_queue",
|
||
|
|
"tableTo": "participants",
|
||
|
|
"columnsFrom": [
|
||
|
|
"participant_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.draft_slots": {
|
||
|
|
"name": "draft_slots",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"season_id": {
|
||
|
|
"name": "season_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"team_id": {
|
||
|
|
"name": "team_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"draft_order": {
|
||
|
|
"name": "draft_order",
|
||
|
|
"type": "integer",
|
||
|
|
"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": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"draft_slots_season_id_seasons_id_fk": {
|
||
|
|
"name": "draft_slots_season_id_seasons_id_fk",
|
||
|
|
"tableFrom": "draft_slots",
|
||
|
|
"tableTo": "seasons",
|
||
|
|
"columnsFrom": [
|
||
|
|
"season_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"draft_slots_team_id_teams_id_fk": {
|
||
|
|
"name": "draft_slots_team_id_teams_id_fk",
|
||
|
|
"tableFrom": "draft_slots",
|
||
|
|
"tableTo": "teams",
|
||
|
|
"columnsFrom": [
|
||
|
|
"team_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.draft_timers": {
|
||
|
|
"name": "draft_timers",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"season_id": {
|
||
|
|
"name": "season_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"team_id": {
|
||
|
|
"name": "team_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"time_remaining": {
|
||
|
|
"name": "time_remaining",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"updated_at": {
|
||
|
|
"name": "updated_at",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"draft_timers_season_id_seasons_id_fk": {
|
||
|
|
"name": "draft_timers_season_id_seasons_id_fk",
|
||
|
|
"tableFrom": "draft_timers",
|
||
|
|
"tableTo": "seasons",
|
||
|
|
"columnsFrom": [
|
||
|
|
"season_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"draft_timers_team_id_teams_id_fk": {
|
||
|
|
"name": "draft_timers_team_id_teams_id_fk",
|
||
|
|
"tableFrom": "draft_timers",
|
||
|
|
"tableTo": "teams",
|
||
|
|
"columnsFrom": [
|
||
|
|
"team_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.leagues": {
|
||
|
|
"name": "leagues",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"created_by": {
|
||
|
|
"name": "created_by",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"current_season_id": {
|
||
|
|
"name": "current_season_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"is_public_draft_board": {
|
||
|
|
"name": "is_public_draft_board",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 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,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.participant_results": {
|
||
|
|
"name": "participant_results",
|
||
|
|
"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
|
||
|
|
},
|
||
|
|
"sports_season_id": {
|
||
|
|
"name": "sports_season_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"final_position": {
|
||
|
|
"name": "final_position",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"points_awarded": {
|
||
|
|
"name": "points_awarded",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"qualifying_points": {
|
||
|
|
"name": "qualifying_points",
|
||
|
|
"type": "numeric(10, 2)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"notes": {
|
||
|
|
"name": "notes",
|
||
|
|
"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,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"participant_results_participant_id_participants_id_fk": {
|
||
|
|
"name": "participant_results_participant_id_participants_id_fk",
|
||
|
|
"tableFrom": "participant_results",
|
||
|
|
"tableTo": "participants",
|
||
|
|
"columnsFrom": [
|
||
|
|
"participant_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"participant_results_sports_season_id_sports_seasons_id_fk": {
|
||
|
|
"name": "participant_results_sports_season_id_sports_seasons_id_fk",
|
||
|
|
"tableFrom": "participant_results",
|
||
|
|
"tableTo": "sports_seasons",
|
||
|
|
"columnsFrom": [
|
||
|
|
"sports_season_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.participants": {
|
||
|
|
"name": "participants",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"sports_season_id": {
|
||
|
|
"name": "sports_season_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"short_name": {
|
||
|
|
"name": "short_name",
|
||
|
|
"type": "varchar(100)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"external_id": {
|
||
|
|
"name": "external_id",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"expected_value": {
|
||
|
|
"name": "expected_value",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"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": {
|
||
|
|
"participants_sports_season_id_sports_seasons_id_fk": {
|
||
|
|
"name": "participants_sports_season_id_sports_seasons_id_fk",
|
||
|
|
"tableFrom": "participants",
|
||
|
|
"tableTo": "sports_seasons",
|
||
|
|
"columnsFrom": [
|
||
|
|
"sports_season_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.season_sports": {
|
||
|
|
"name": "season_sports",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"season_id": {
|
||
|
|
"name": "season_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"sports_season_id": {
|
||
|
|
"name": "sports_season_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"season_sports_season_id_seasons_id_fk": {
|
||
|
|
"name": "season_sports_season_id_seasons_id_fk",
|
||
|
|
"tableFrom": "season_sports",
|
||
|
|
"tableTo": "seasons",
|
||
|
|
"columnsFrom": [
|
||
|
|
"season_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"season_sports_sports_season_id_sports_seasons_id_fk": {
|
||
|
|
"name": "season_sports_sports_season_id_sports_seasons_id_fk",
|
||
|
|
"tableFrom": "season_sports",
|
||
|
|
"tableTo": "sports_seasons",
|
||
|
|
"columnsFrom": [
|
||
|
|
"sports_season_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.season_template_sports": {
|
||
|
|
"name": "season_template_sports",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"template_id": {
|
||
|
|
"name": "template_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"sports_season_id": {
|
||
|
|
"name": "sports_season_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"season_template_sports_template_id_season_templates_id_fk": {
|
||
|
|
"name": "season_template_sports_template_id_season_templates_id_fk",
|
||
|
|
"tableFrom": "season_template_sports",
|
||
|
|
"tableTo": "season_templates",
|
||
|
|
"columnsFrom": [
|
||
|
|
"template_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"season_template_sports_sports_season_id_sports_seasons_id_fk": {
|
||
|
|
"name": "season_template_sports_sports_season_id_sports_seasons_id_fk",
|
||
|
|
"tableFrom": "season_template_sports",
|
||
|
|
"tableTo": "sports_seasons",
|
||
|
|
"columnsFrom": [
|
||
|
|
"sports_season_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.season_templates": {
|
||
|
|
"name": "season_templates",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"year": {
|
||
|
|
"name": "year",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"is_active": {
|
||
|
|
"name": "is_active",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 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": {},
|
||
|
|
"foreignKeys": {},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.seasons": {
|
||
|
|
"name": "seasons",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"league_id": {
|
||
|
|
"name": "league_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"year": {
|
||
|
|
"name": "year",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"status": {
|
||
|
|
"name": "status",
|
||
|
|
"type": "season_status",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'pre_draft'"
|
||
|
|
},
|
||
|
|
"template_id": {
|
||
|
|
"name": "template_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"draft_rounds": {
|
||
|
|
"name": "draft_rounds",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 20
|
||
|
|
},
|
||
|
|
"flex_spots": {
|
||
|
|
"name": "flex_spots",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"draft_date_time": {
|
||
|
|
"name": "draft_date_time",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"draft_initial_time": {
|
||
|
|
"name": "draft_initial_time",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 120
|
||
|
|
},
|
||
|
|
"draft_increment_time": {
|
||
|
|
"name": "draft_increment_time",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 30
|
||
|
|
},
|
||
|
|
"current_pick_number": {
|
||
|
|
"name": "current_pick_number",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 1
|
||
|
|
},
|
||
|
|
"draft_started_at": {
|
||
|
|
"name": "draft_started_at",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"draft_paused": {
|
||
|
|
"name": "draft_paused",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"invite_code": {
|
||
|
|
"name": "invite_code",
|
||
|
|
"type": "varchar(20)",
|
||
|
|
"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": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"seasons_league_id_leagues_id_fk": {
|
||
|
|
"name": "seasons_league_id_leagues_id_fk",
|
||
|
|
"tableFrom": "seasons",
|
||
|
|
"tableTo": "leagues",
|
||
|
|
"columnsFrom": [
|
||
|
|
"league_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"seasons_template_id_season_templates_id_fk": {
|
||
|
|
"name": "seasons_template_id_season_templates_id_fk",
|
||
|
|
"tableFrom": "seasons",
|
||
|
|
"tableTo": "season_templates",
|
||
|
|
"columnsFrom": [
|
||
|
|
"template_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {
|
||
|
|
"seasons_invite_code_unique": {
|
||
|
|
"name": "seasons_invite_code_unique",
|
||
|
|
"nullsNotDistinct": false,
|
||
|
|
"columns": [
|
||
|
|
"invite_code"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.sports": {
|
||
|
|
"name": "sports",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"type": {
|
||
|
|
"name": "type",
|
||
|
|
"type": "sport_type",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"slug": {
|
||
|
|
"name": "slug",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"icon_url": {
|
||
|
|
"name": "icon_url",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"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,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {
|
||
|
|
"sports_slug_unique": {
|
||
|
|
"name": "sports_slug_unique",
|
||
|
|
"nullsNotDistinct": false,
|
||
|
|
"columns": [
|
||
|
|
"slug"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.sports_seasons": {
|
||
|
|
"name": "sports_seasons",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"sport_id": {
|
||
|
|
"name": "sport_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"year": {
|
||
|
|
"name": "year",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"start_date": {
|
||
|
|
"name": "start_date",
|
||
|
|
"type": "date",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"end_date": {
|
||
|
|
"name": "end_date",
|
||
|
|
"type": "date",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"status": {
|
||
|
|
"name": "status",
|
||
|
|
"type": "sports_season_status",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'upcoming'"
|
||
|
|
},
|
||
|
|
"scoring_type": {
|
||
|
|
"name": "scoring_type",
|
||
|
|
"type": "scoring_type",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"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": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"sports_seasons_sport_id_sports_id_fk": {
|
||
|
|
"name": "sports_seasons_sport_id_sports_id_fk",
|
||
|
|
"tableFrom": "sports_seasons",
|
||
|
|
"tableTo": "sports",
|
||
|
|
"columnsFrom": [
|
||
|
|
"sport_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.teams": {
|
||
|
|
"name": "teams",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"season_id": {
|
||
|
|
"name": "season_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"logo_url": {
|
||
|
|
"name": "logo_url",
|
||
|
|
"type": "varchar(512)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"owner_id": {
|
||
|
|
"name": "owner_id",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"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,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"teams_season_id_seasons_id_fk": {
|
||
|
|
"name": "teams_season_id_seasons_id_fk",
|
||
|
|
"tableFrom": "teams",
|
||
|
|
"tableTo": "seasons",
|
||
|
|
"columnsFrom": [
|
||
|
|
"season_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.users": {
|
||
|
|
"name": "users",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"clerk_id": {
|
||
|
|
"name": "clerk_id",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"email": {
|
||
|
|
"name": "email",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"username": {
|
||
|
|
"name": "username",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"display_name": {
|
||
|
|
"name": "display_name",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"first_name": {
|
||
|
|
"name": "first_name",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"last_name": {
|
||
|
|
"name": "last_name",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"image_url": {
|
||
|
|
"name": "image_url",
|
||
|
|
"type": "varchar(512)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"is_admin": {
|
||
|
|
"name": "is_admin",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 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,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {
|
||
|
|
"users_clerk_id_unique": {
|
||
|
|
"name": "users_clerk_id_unique",
|
||
|
|
"nullsNotDistinct": false,
|
||
|
|
"columns": [
|
||
|
|
"clerk_id"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"enums": {
|
||
|
|
"public.autodraft_mode": {
|
||
|
|
"name": "autodraft_mode",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"next_pick",
|
||
|
|
"while_on"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.picked_by_type": {
|
||
|
|
"name": "picked_by_type",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"owner",
|
||
|
|
"commissioner",
|
||
|
|
"auto"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.scoring_type": {
|
||
|
|
"name": "scoring_type",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"playoffs",
|
||
|
|
"regular_season",
|
||
|
|
"majors"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.season_status": {
|
||
|
|
"name": "season_status",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"pre_draft",
|
||
|
|
"draft",
|
||
|
|
"active",
|
||
|
|
"completed"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.sport_type": {
|
||
|
|
"name": "sport_type",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"team",
|
||
|
|
"individual"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.sports_season_status": {
|
||
|
|
"name": "sports_season_status",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"upcoming",
|
||
|
|
"active",
|
||
|
|
"completed"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"schemas": {},
|
||
|
|
"sequences": {},
|
||
|
|
"roles": {},
|
||
|
|
"policies": {},
|
||
|
|
"views": {},
|
||
|
|
"_meta": {
|
||
|
|
"columns": {},
|
||
|
|
"schemas": {},
|
||
|
|
"tables": {}
|
||
|
|
}
|
||
|
|
}
|