From 6bd24af2ffbea91db1b10a5d5258980ce2068c7f Mon Sep 17 00:00:00 2001
From: sadbeast <sadbeast@sadbeast.com>
Date: Tue, 16 Jul 2024 18:16:29 -0700
Subject: let's go

---
 src/db/teams.sql | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 src/db/teams.sql

(limited to 'src/db/teams.sql')

diff --git a/src/db/teams.sql b/src/db/teams.sql
new file mode 100644
index 0000000..5f08434
--- /dev/null
+++ b/src/db/teams.sql
@@ -0,0 +1,52 @@
+CREATE TABLE teams(
+    team_id int NOT NULL GENERATED ALWAYS AS IDENTITY,
+    league_division_id int NOT NULL,
+    name text NOT NULL,
+    external_id text,
+    created_at timestamptz NOT NULL DEFAULT now(),
+    modified_at timestamptz NOT NULL DEFAULT now(),
+
+    CONSTRAINT teams_pk PRIMARY KEY (team_id),
+    CONSTRAINT teams_league_divisions_fk FOREIGN KEY (league_division_id) REFERENCES league_divisions(league_division_id) MATCH SIMPLE ON DELETE NO ACTION ON UPDATE NO ACTION,
+    CONSTRAINT teams_name_ck CHECK (char_length(name) <= 255)
+);
+
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Buffalo', 1, '134918');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Miami', 1, '134919');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('New England', 1, '134920');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('NYJ', 1, '134921');
+
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Baltimore', 2, '134922');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Cincinnati', 2, '134923');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Cleveland', 2, '134924');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Pittsburgh', 2, '134925');
+
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Houston', 3, '134926');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Indianapolis', 3, '134927');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Jacksonville', 3, '134928');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Tennessee', 3, '134929');
+
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Denver', 4, '134930');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Kansas City', 4, '134931');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Las Vegas', 4, '134932');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('LAC', 4, '135908');
+
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Dallas', 5, '134934');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('NYG', 5, '134935');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Philadelphia', 5, '134936');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Washington', 5, '134937');
+
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Chicago', 6, '134938');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Detroit', 6, '134939');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Green Bay', 6, '134940');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Minnesota', 6, '134941');
+
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Atlanta', 7, '134942');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Carolina', 7, '134943');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('New Orleans', 7, '134944');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Tampa Bay', 7, '134945');
+
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Arizona', 8, '134946');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('LAR', 8, '135907');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('San Francisco', 8, '134948');
+INSERT INTO teams(name, league_division_id, external_id) VALUES ('Seattle', 8, '134949');
-- 
cgit v1.2.3

