MSP-2243 add migration: create audit_event table
This commit is contained in:
1 parent
150d61fb18
commit
73ab09dc7d
1 file changed
+19
@@ -0,0 +1,19 @@
|
|||||||
|
-- +goose Up
|
||||||
|
|
||||||
|
CREATE TABLE audit_event
|
||||||
|
(
|
||||||
|
event text NOT NULL PRIMARY KEY,
|
||||||
|
enable bool NOT NULL DEFAULT false
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO audit_event (event, enable)
|
||||||
|
VALUES ('success_login', true),
|
||||||
|
('error_login', true),
|
||||||
|
('success_logout', true),
|
||||||
|
('role_changed', true),
|
||||||
|
('user_changed', true);
|
||||||
|
|
||||||
|
ALTER TABLE audit
|
||||||
|
ADD COLUMN event text not null default '';
|
||||||
|
|
||||||
|
-- +goose Down
|
||||||
Reference in new issue
Block a user