mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-21 13:47:39 +02:00
feat: add migration for cdn_tokens (#10021)
This commit is contained in:
parent
5fb718efcd
commit
76b201e40e
20
src/migrations/20250521160000-add-cdn-tokens-table.js
Normal file
20
src/migrations/20250521160000-add-cdn-tokens-table.js
Normal file
@ -0,0 +1,20 @@
|
||||
exports.up = (db, callback) => {
|
||||
db.runSql(
|
||||
`CREATE TABLE IF NOT EXISTS cdn_tokens
|
||||
(
|
||||
id text not null PRIMARY KEY,
|
||||
token_name text not null,
|
||||
project text not null,
|
||||
environment text not null,
|
||||
created_at TIMESTAMP WITH TIME ZONE DEFAULT now(),
|
||||
expires_at TIMESTAMP WITH TIME ZONE,
|
||||
seen_at TIMESTAMP WITH TIME ZONE
|
||||
);
|
||||
`,
|
||||
callback,
|
||||
);
|
||||
};
|
||||
|
||||
exports.down = (db, callback) => {
|
||||
db.runSql('DROP TABLE IF EXISTS cdn_tokens;', callback);
|
||||
};
|
Loading…
Reference in New Issue
Block a user