mirror of
https://github.com/onepanelio/onepanel.git
synced 2024-08-21 00:00:34 +08:00
Adding table to track workflow executions.
- Data from this table will be used to generate workflow statistics.
This commit is contained in:
parent
e0f9b77846
commit
6fc161b128
20
db/20200413141037_createworkflowexecutionstatistics.sql
Normal file
20
db/20200413141037_createworkflowexecutionstatistics.sql
Normal file
@ -0,0 +1,20 @@
|
||||
-- +goose Up
|
||||
-- +goose StatementBegin
|
||||
CREATE TABLE workflow_executions
|
||||
(
|
||||
id serial PRIMARY KEY,
|
||||
workflow_template_id integer NOT NULL REFERENCES workflow_templates ON DELETE CASCADE,
|
||||
name text NOT NULL CHECK (name <> ''),
|
||||
namespace varchar(36) NOT NULL,
|
||||
|
||||
-- auditing info
|
||||
created_at timestamp NOT NULL DEFAULT (NOW() at time zone 'utc'),
|
||||
finished_at timestamp DEFAULT NULL,
|
||||
failed_at timestamp DEFAULT NULL
|
||||
);
|
||||
-- +goose StatementEnd
|
||||
|
||||
-- +goose Down
|
||||
-- +goose StatementBegin
|
||||
DROP TABLE workflow_executions;
|
||||
-- +goose StatementEnd
|
Loading…
Reference in New Issue
Block a user