Skip to content

Commit d58629c

Browse files
committed
fix: added new columns
1 parent 69c89c7 commit d58629c

4 files changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ jobs:
3434
cd $PROJECT_PATH
3535
git pull
3636
npm i
37+
npm run migration:up
3738
npm run build

database/migrations/.snapshot-db.sqlite.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,24 @@
365365
"primary": false,
366366
"nullable": false,
367367
"mappedType": "text"
368+
},
369+
"custom_css": {
370+
"name": "custom_css",
371+
"type": "text",
372+
"unsigned": false,
373+
"autoincrement": false,
374+
"primary": false,
375+
"nullable": true,
376+
"mappedType": "text"
377+
},
378+
"custom_js": {
379+
"name": "custom_js",
380+
"type": "text",
381+
"unsigned": false,
382+
"autoincrement": false,
383+
"primary": false,
384+
"nullable": true,
385+
"mappedType": "text"
368386
}
369387
},
370388
"name": "plugin",
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
'use strict';
2+
Object.defineProperty(exports, '__esModule', { value: true });
3+
const { Migration } = require('@mikro-orm/migrations');
4+
5+
class Migration20250218075239 extends Migration {
6+
7+
async up() {
8+
this.addSql('alter table `plugin` add column `custom_css` text null;');
9+
this.addSql('alter table `plugin` add column `custom_js` text null;');
10+
}
11+
12+
}
13+
exports.Migration20250218075239 = Migration20250218075239;

src/entities/Plugin.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ export class Plugin {
2424

2525
@Property()
2626
iconUrl: string;
27+
28+
@Property({nullable: true})
29+
customCSS?: string;
30+
31+
@Property({nullable: true})
32+
customJS?: string;
2733
}
2834

2935
export class PluginRepository extends EntityRepository<Plugin> {

0 commit comments

Comments
 (0)