Bazaar-backend: Add user entity field to members table

A new field has been added to the members table. When a user has
requested to be added to a project the "identityApi" is used to get the
entity ref of the user.

Signed-off-by: Niklas Aronsson <niklasar@axis.com>
This commit is contained in:
Niklas Aronsson
2022-08-18 07:31:33 +02:00
parent 452063b87d
commit 8554533546
8 changed files with 86 additions and 4 deletions
@@ -0,0 +1,27 @@
/*
* Copyright 2022 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
exports.up = async function up(knex) {
await knex.schema.alterTable('members', table => {
table.string('user_ref').nullable();
});
};
exports.down = async function down(knex) {
return knex.schema.table('members', table => {
table.dropColumn('user_ref');
});
};