mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-24 06:06:00 +00:00
fix
This commit is contained in:
@@ -638,6 +638,10 @@ describe('Deploy database', () => {
|
||||
testWrapper(async (conn, driver, engine) => {
|
||||
await testDatabaseDeploy(engine, conn, driver, [
|
||||
[
|
||||
{
|
||||
name: 't1.uninstall.sql',
|
||||
text: 'drop table t1',
|
||||
},
|
||||
{
|
||||
name: 't1.install.sql',
|
||||
text: 'create table t1 (id int primary key); insert into t1 (id) values (1)',
|
||||
|
||||
@@ -161,7 +161,8 @@ export class ScriptDrivedDeployer {
|
||||
case 'install':
|
||||
if (isEqual) return;
|
||||
const uninstallFile = this.uninstall.find(x => x.name == file.name.replace('.install.sql', '.uninstall.sql'));
|
||||
if (uninstallFile) {
|
||||
if (uninstallFile && journalItem) {
|
||||
// file was previously installed, uninstall first
|
||||
await this.runFileCore(
|
||||
uninstallFile,
|
||||
'uninstall',
|
||||
|
||||
Reference in New Issue
Block a user