SQL
CREATE TABLE `competitions` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`name` text NOT NULL,
`short_name` text NOT NULL,
`api_code` text NOT NULL,
`sofascore_tournament_id` integer,
`fbref_comp_id` integer,
`season` integer DEFAULT 2025 NOT NULL,
`created_at` text DEFAULT (datetime('now'))
)
+ Add column
Columns
+ Add index
Indexes
| Name |
Columns |
Unique |
SQL |
Drop? |
| competitions_api_code_unique |
api_code
|
✓ |
SQL
CREATE UNIQUE INDEX `competitions_api_code_unique`
ON `competitions` (`api_code`)
|
Drop
|
| competitions_short_name_unique |
short_name
|
✓ |
SQL
CREATE UNIQUE INDEX `competitions_short_name_unique`
ON `competitions` (`short_name`)
|
Drop
|