removed legacy admin and czar fields

This commit is contained in:
totutotu
2019-05-14 10:16:09 +03:00
parent fc92b7625c
commit 612a3acf33
4 changed files with 12 additions and 13 deletions
@@ -0,0 +1,8 @@
module.exports = {
up: async (queryInterface) => {
await queryInterface.removeColumn('users', 'czar')
await queryInterface.removeColumn('users', 'admin')
},
down: async () => {
}
}
@@ -51,9 +51,7 @@ const User = sequelize.define('users',
unique: true
},
email: { type: Sequelize.STRING },
language: { type: Sequelize.STRING },
admin: { type: Sequelize.BOOLEAN },
czar: { type: Sequelize.BOOLEAN }
language: { type: Sequelize.STRING }
},
{
tableName: 'users',
@@ -142,7 +142,6 @@ const createUser = async (username, fullname, email) => {
return User.create({
username: username,
full_name: fullname,
czar: false,
email
})
}
@@ -23,27 +23,21 @@ const default_users = [
full_name: 'Pekka Pouta',
username: 'poutaukko',
email: 'pekka.pouta@ilmatieteenlaitos.fi',
language: 'finnish',
admin: false,
czar: false
language: 'finnish'
},
{
id: 666,
full_name: 'Sylvester Stallone',
username: 'rambo666',
email: 'sylvester@rambo.com',
language: 'americano',
admin: false,
czar: true
language: 'americano'
},
{
id: 665,
full_name: 'Morgan Freeman',
username: 'freeman',
email: 'morgan@freeman.com',
language: 'americano',
admin: false,
czar: false
language: 'americano'
}
]