mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2025-10-03 17:59:24 +02:00
Update sequelize
This commit is contained in:
parent
17058c375c
commit
e70a80bf46
38 changed files with 238 additions and 220 deletions
|
@ -15,13 +15,13 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { QueryInterface, Sequelize } from 'sequelize'
|
||||
import { QueryInterface, Sequelize, Transaction } from 'sequelize'
|
||||
import { attributesVersion5 as deviceAttributes } from '../../device'
|
||||
import { attributesVersion3 as userAttributes } from '../../user'
|
||||
|
||||
export async function up (queryInterface: QueryInterface, sequelize: Sequelize) {
|
||||
await sequelize.transaction({
|
||||
type: 'EXCLUSIVE'
|
||||
type: Transaction.TYPES.EXCLUSIVE
|
||||
}, async (transaction) => {
|
||||
// users
|
||||
await queryInterface.addColumn('Users', 'relaxPrimaryDeviceRule', {
|
||||
|
@ -41,7 +41,7 @@ export async function up (queryInterface: QueryInterface, sequelize: Sequelize)
|
|||
|
||||
export async function down (queryInterface: QueryInterface, sequelize: Sequelize) {
|
||||
await sequelize.transaction({
|
||||
type: 'EXCLUSIVE'
|
||||
type: Transaction.TYPES.EXCLUSIVE
|
||||
}, async (transaction) => {
|
||||
// users
|
||||
await queryInterface.removeColumn('Users', 'relaxPrimaryDeviceRule', { transaction })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue