diff --git a/src/migrations/20240716135038-integration-events.js b/src/migrations/20240716135038-integration-events.js new file mode 100644 index 000000000000..11b9555a8069 --- /dev/null +++ b/src/migrations/20240716135038-integration-events.js @@ -0,0 +1,29 @@ +exports.up = function (db, cb) { + db.runSql( + ` + CREATE TABLE IF NOT EXISTS integration_events + ( + id BIGSERIAL PRIMARY KEY NOT NULL, + integration_id INTEGER NOT NULL REFERENCES addons(id) ON DELETE CASCADE, + created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), + state TEXT NOT NULL, + state_details TEXT NOT NULL, + event JSONB NOT NULL, + details JSONB NOT NULL + ); + + CREATE INDEX IF NOT EXISTS idx_integration_events_integration_id ON integration_events(integration_id); + `, + cb, + ); +}; + +exports.down = function (db, cb) { + db.runSql( + ` + DROP INDEX IF EXISTS idx_integration_events_integration_id; + DROP TABLE IF EXISTS integration_events; + `, + cb, + ); +}; diff --git a/website/sidebars.js b/website/sidebars.js index 12d2e0e83c1a..61a233d9c06d 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -174,8 +174,8 @@ module.exports = { { type: 'doc', label: 'Examples', - id: 'feature-flag-tutorials/rust/examples' - } + id: 'feature-flag-tutorials/rust/examples', + }, ], }, {