From 8c0c5d08fd8ff83950b9ffed347fb6b2f21797a3 Mon Sep 17 00:00:00 2001 From: les Date: Mon, 27 Jan 2020 01:02:06 +0100 Subject: [PATCH] self oauth2_client migration --- .../20200126235309-oauth_local_client.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 server/migrations/20200126235309-oauth_local_client.js diff --git a/server/migrations/20200126235309-oauth_local_client.js b/server/migrations/20200126235309-oauth_local_client.js new file mode 100644 index 00000000..0fe56b47 --- /dev/null +++ b/server/migrations/20200126235309-oauth_local_client.js @@ -0,0 +1,17 @@ +'use strict' + +module.exports = { + up: (queryInterface, Sequelize) => { + return queryInterface.bulkInsert('oauth_clients', [{ + id: 'self', + name: 'self', + scopes: 'all', + createdAt: new Date(), + updatedAt: new Date() + }]) + }, + + down: (queryInterface, Sequelize) => { + return queryInterface.bulkDelete('oauth_clients', { id: 'self' }) + } +}