setup/postgres/psql_patch_1.5.0.sql

Tue, 11 Mar 2025 14:01:48 +0100

author
Mike Becker <universe@uap-core.de>
date
Tue, 11 Mar 2025 14:01:48 +0100
changeset 361
749d71470b0f
parent 360
f60ecdc0431f
permissions
-rw-r--r--

format timestamp to actually look like a timestamp

resolves #539

-- apply this script to patch a version < 1.5.0 database to version 1.5.0

alter table lpit_issue_history_event
    add userid integer null references lpit_user (userid) on delete set null;

create table lpit_variant
(
    id          serial primary key,
    project     integer not null references lpit_project (projectid),
    name        text    not null,
    node        text    not null,
    color       char(6) not null default '000000',
    ordinal     integer not null default 0,
    description text,
    active      boolean not null default true
);

create unique index lpit_variant_node_unique on lpit_variant (project, node);

create table lpit_issue_variant_status
(
    issueid   integer        not null references lpit_issue (issueid),
    variant   integer        not null references lpit_variant (id),
    status    issue_status   not null default 'InSpecification',
    outdated  boolean        not null default false,
    primary key (issueid, variant)
);

alter table lpit_commit_ref add commit_time timestamp with time zone null;

mercurial