golang.org/x/build@v0.0.0-20240506185731-218518f32b70/internal/relui/migrations/20210909141405_create_workflows_table.up.sql (about)

     1  -- Copyright 2021 The Go Authors. All rights reserved.
     2  -- Use of this source code is governed by a BSD-style
     3  -- license that can be found in the LICENSE file.
     4  
     5  CREATE TABLE workflows (
     6      id uuid PRIMARY KEY,
     7      params jsonb,
     8      name text,
     9      created_at timestamp with time zone NOT NULL default current_timestamp,
    10      updated_at timestamp with time zone NOT NULL default current_timestamp
    11  );
    12  
    13  CREATE TABLE tasks (
    14      workflow_id uuid REFERENCES workflows (id),
    15      name text,
    16      finished bool NOT NULL DEFAULT false,
    17      result jsonb,
    18      error text,
    19      created_at timestamp with time zone NOT NULL default current_timestamp,
    20      updated_at timestamp with time zone NOT NULL default current_timestamp,
    21      PRIMARY KEY (workflow_id, name)
    22  );