home / football

season

0 rows where updated_by_run_id = 2 sorted by season_name descending

✎ View and edit SQL

This data as json

0 records

CREATE TABLE season (
	season_id INTEGER NOT NULL, 
	competition_id INTEGER NOT NULL, 
	season_name VARCHAR(32) NOT NULL, 
	start_date DATE, 
	end_date DATE, 
	is_active BOOLEAN NOT NULL, 
	teams_expected INTEGER, 
	created_at DATETIME NOT NULL, 
	updated_at DATETIME NOT NULL, 
	created_by_run_id INTEGER, 
	updated_by_run_id INTEGER, 
	source_id INTEGER NOT NULL, 
	source_raw_key VARCHAR(512), 
	PRIMARY KEY (season_id), 
	CONSTRAINT uq_season_competition_name UNIQUE (competition_id, season_name), 
	FOREIGN KEY(competition_id) REFERENCES competition (competition_id), 
	FOREIGN KEY(created_by_run_id) REFERENCES ingestion_run (run_id), 
	FOREIGN KEY(updated_by_run_id) REFERENCES ingestion_run (run_id), 
	FOREIGN KEY(source_id) REFERENCES data_source (source_id)
);
CREATE INDEX ix_season_updated_by_run_id ON season (updated_by_run_id);
CREATE INDEX ix_season_source_raw_key ON season (source_raw_key);
CREATE INDEX ix_season_competition_id ON season (competition_id);
CREATE INDEX ix_season_created_by_run_id ON season (created_by_run_id);
CREATE INDEX ix_season_source_id ON season (source_id);
CREATE INDEX ix_season_season_name ON season (season_name);
Powered by Datasette · Queries took 13.661ms