mirror of
https://github.com/UniversityOfHelsinkiCS/oodikone.git
synced 2026-10-12 19:03:39 +03:00
removed legacy admin and czar fields
This commit is contained in:
+8
@@ -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'
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user