Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOISSUE - Add Metadata to Rule struct #39

Merged
merged 5 commits into from
Jan 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
format sql
Signed-off-by: ianmuchyri <[email protected]>
  • Loading branch information
ianmuchyri committed Jan 13, 2025
commit 76a91c457798f2f06cc553362826b980c1fa454b
36 changes: 18 additions & 18 deletions re/postgres/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ func Migration() *migrate.MemoryMigrationSource {
// STATUS 0 to imply enabled and 1 to imply disabled
Up: []string{
`CREATE TABLE IF NOT EXISTS rules (
id VARCHAR(36) PRIMARY KEY,
name VARCHAR(1024),
domain_id VARCHAR(36) NOT NULL,
metadata JSONB,
created_by VARCHAR(254),
created_at TIMESTAMP,
updated_at TIMESTAMP,
updated_by VARCHAR(254),
input_channel VARCHAR(36),
input_topic TEXT,
output_channel VARCHAR(36),
output_topic TEXT,
status SMALLINT NOT NULL DEFAULT 0 CHECK (status >= 0),
logic_type SMALLINT NOT NULL DEFAULT 0 CHECK (status >= 0),
logic_value BYTEA,
recurring_time TIMESTAMP[],
recurring_type SMALLINT,
recurring_period SMALLINT
id VARCHAR(36) PRIMARY KEY,
name VARCHAR(1024),
domain_id VARCHAR(36) NOT NULL,
metadata JSONB,
created_by VARCHAR(254),
created_at TIMESTAMP,
updated_at TIMESTAMP,
updated_by VARCHAR(254),
input_channel VARCHAR(36),
input_topic TEXT,
output_channel VARCHAR(36),
output_topic TEXT,
status SMALLINT NOT NULL DEFAULT 0 CHECK (status >= 0),
logic_type SMALLINT NOT NULL DEFAULT 0 CHECK (status >= 0),
logic_value BYTEA,
recurring_time TIMESTAMP[],
recurring_type SMALLINT,
recurring_period SMALLINT
)`,
},
Down: []string{
Expand Down