1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-30 10:11:23 +02:00
woodpecker/store/datastore/ddl/sqlite3/14.sql

23 lines
475 B
MySQL
Raw Normal View History

-- +migrate Up
ALTER TABLE repos ADD COLUMN repo_gated BOOLEAN;
UPDATE repos SET repo_gated = 0;
CREATE TABLE senders (
sender_id INTEGER PRIMARY KEY AUTOINCREMENT
,sender_repo_id INTEGER
,sender_login BOOLEAN
,sender_allow BOOLEAN
,sender_block BOOLEAN
,UNIQUE(sender_repo_id,sender_login)
);
CREATE INDEX sender_repo_ix ON senders (sender_repo_id);
-- +migrate Down
ALTER TABLE repos DROP COLUMN repo_gated;
DROP INDEX sender_repo_ix;
DROP TABLE senders;