Skip to content

Commit

Permalink
drop tables
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Apr 15, 2024
1 parent dd49ab2 commit 6ea806b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Migrations/Version20240121100724.php
Expand Up @@ -106,14 +106,17 @@ public function postUp(Schema $schema): void

if (in_array('fusio_app_token', $tableNames)) {
$this->connection->executeQuery('INSERT INTO fusio_token SELECT id, app_id, user_id, null AS tenant_id, 2 AS category_id, status, null AS name, token, refresh, scope, ip, expire, date FROM fusio_app_token');
$this->connection->createSchemaManager()->dropTable('fusio_app_token');
}

if (in_array('fusio_event_subscription', $tableNames)) {
$this->connection->executeQuery('INSERT INTO fusio_webhook SELECT id, event_id, user_id, null AS tenant_id, status, \'Webhook\' AS name, endpoint FROM fusio_event_subscription');
$this->connection->createSchemaManager()->dropTable('fusio_event_subscription');
}

if (in_array('fusio_event_response', $tableNames)) {
$this->connection->executeQuery('INSERT INTO fusio_webhook_response SELECT id, subscription_id AS webhook_id, status, attempts, code, body, execute_date, insert_date FROM fusio_event_response');
$this->connection->createSchemaManager()->dropTable('fusio_event_response');
}
}
}

0 comments on commit 6ea806b

Please sign in to comment.