mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-28 15:19:36 +02:00
Merge branch 'master' of https://github.com/pawelmalak/flame into merge_upstream_2020-12-06
This commit is contained in:
commit
021bd4e85a
266 changed files with 13470 additions and 7067 deletions
25
db/migrations/05_app-categories.js
Normal file
25
db/migrations/05_app-categories.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
const { DataTypes } = require('sequelize');
|
||||
const { INTEGER } = DataTypes;
|
||||
|
||||
const up = async (query) => {
|
||||
await query.addColumn('categories', 'type', {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false,
|
||||
defaultValue: 'bookmarks'
|
||||
});
|
||||
await query.addColumn('apps', 'categoryId', {
|
||||
type: INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: -1,
|
||||
});
|
||||
};
|
||||
|
||||
const down = async (query) => {
|
||||
await query.removeColumn('apps', 'categoryId');
|
||||
await query.removeColumn('categories', 'type');
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
up,
|
||||
down,
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue