mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-02 15:00:23 +00:00
12 lines
463 B
MySQL
12 lines
463 B
MySQL
|
-- Add migration script here
|
||
|
|
||
|
CREATE TABLE hosted_projects (
|
||
|
id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
|
||
|
channel_id INT NOT NULL REFERENCES channels(id),
|
||
|
name TEXT NOT NULL,
|
||
|
visibility TEXT NOT NULL,
|
||
|
deleted_at TIMESTAMP NULL
|
||
|
);
|
||
|
CREATE INDEX idx_hosted_projects_on_channel_id ON hosted_projects (channel_id);
|
||
|
CREATE UNIQUE INDEX uix_hosted_projects_on_channel_id_and_name ON hosted_projects (channel_id, name) WHERE (deleted_at IS NULL);
|