mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-19 03:29:37 +02:00
28 lines
550 B
JavaScript
28 lines
550 B
JavaScript
|
const { DataTypes } = require('sequelize');
|
||
|
const { INTEGER, FLOAT } = DataTypes;
|
||
|
|
||
|
const up = async (query) => {
|
||
|
await query.addColumn('weather', 'humidity', {
|
||
|
type: INTEGER,
|
||
|
});
|
||
|
|
||
|
await query.addColumn('weather', 'windK', {
|
||
|
type: FLOAT,
|
||
|
});
|
||
|
|
||
|
await query.addColumn('weather', 'windM', {
|
||
|
type: FLOAT,
|
||
|
});
|
||
|
};
|
||
|
|
||
|
const down = async (query) => {
|
||
|
await query.removeColumn('weather', 'humidity');
|
||
|
await query.removeColumn('weather', 'windK');
|
||
|
await query.removeColumn('weather', 'windM');
|
||
|
};
|
||
|
|
||
|
module.exports = {
|
||
|
up,
|
||
|
down,
|
||
|
};
|