1
0
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:
Gastón Fournier 2025-05-21 16:20:04 +02:00 committed by GitHub
parent 5fb718efcd
commit 76b201e40e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View 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);
};