refactor: Rename AppAuthClient model as OAuthClient

This commit is contained in:
Faruk AYDIN
2024-12-18 17:42:04 +01:00
parent 4a4628e255
commit 8c4b67e147
61 changed files with 588 additions and 571 deletions

View File

@@ -0,0 +1,31 @@
export async function up(knex) {
await knex.schema.renameTable('app_auth_clients', 'oauth_clients');
await knex.schema.raw(
'ALTER INDEX app_auth_clients_pkey RENAME TO oauth_clients_pkey'
);
await knex.schema.raw(
'ALTER INDEX app_auth_clients_name_unique RENAME TO oauth_clients_name_unique'
);
return await knex.schema.alterTable('connections', (table) => {
table.renameColumn('app_auth_client_id', 'oauth_client_id');
});
}
export async function down(knex) {
await knex.schema.renameTable('oauth_clients', 'app_auth_clients');
await knex.schema.raw(
'ALTER INDEX oauth_clients_pkey RENAME TO app_auth_clients_pkey'
);
await knex.schema.raw(
'ALTER INDEX oauth_clients_name_unique RENAME TO app_auth_clients_name_unique'
);
return await knex.schema.alterTable('connections', (table) => {
table.renameColumn('oauth_client_id', 'app_auth_client_id');
});
}