/
wax_boy
/
semaphore_custom
Обзор
Документация
Войти
/
wax_boy
/
semaphore_custom
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
develop
db/sql/migrations/v2.17.0.sql
20 строк
787 B
Denis Gukov
feat(views): add sorting column
23 сен 2025, 10:06
Не верифицирован
23 сен 2025, 10:06
a876c68
Код
Авторство
О чём код?
-- Add hidden and type fields to project__view table alter table project__view add column `hidden` boolean not null default false; alter table project__view add column `type` varchar(20) not null default ''; alter table project__view add column `filter` varchar(1000); alter table project__view add column `sort_column` varchar(100); alter table project__view add column `sort_reverse` boolean not null default false; -- Create All view with position -1 for each existing project insert into project__view (project_id, title, position, hidden, type) select p.id as project_id, 'All' as title, -1 as position, false as hidden, 'all' as type from project p where not exists ( select 1 from project__view pv where pv.project_id = p.id and pv.type = 'all' );