mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 04:00:59 +00:00
This commit is contained in:
parent
4ea763124b
commit
f9a562808d
@ -465,6 +465,11 @@ describe('Deploy database', () => {
|
||||
text: 'create view v1 as select * from t1',
|
||||
};
|
||||
|
||||
const V1_VARIANT2 = {
|
||||
name: 'v1.view.sql',
|
||||
text: 'create view v1 as select 1 as c1',
|
||||
};
|
||||
|
||||
const V1_DELETED = {
|
||||
name: '_deleted_v1.view.sql',
|
||||
text: 'create view _deleted_v1 as select * from t1',
|
||||
@ -565,4 +570,43 @@ describe('Deploy database', () => {
|
||||
});
|
||||
})
|
||||
);
|
||||
|
||||
test.each(engines.map(engine => [engine.label, engine]))(
|
||||
'View redeploy - %s',
|
||||
testWrapper(async (conn, driver, engine) => {
|
||||
await testDatabaseDeploy(
|
||||
engine,
|
||||
conn,
|
||||
driver,
|
||||
[
|
||||
[T1, V1],
|
||||
[T1, V1],
|
||||
[T1, V1],
|
||||
],
|
||||
{
|
||||
markDeleted: true,
|
||||
disallowExtraObjects: true,
|
||||
}
|
||||
);
|
||||
})
|
||||
);
|
||||
|
||||
test.each(engines.map(engine => [engine.label, engine]))(
|
||||
'Change view - %s',
|
||||
testWrapper(async (conn, driver, engine) => {
|
||||
await testDatabaseDeploy(
|
||||
engine,
|
||||
conn,
|
||||
driver,
|
||||
[
|
||||
[T1, V1],
|
||||
[T1, V1_VARIANT2],
|
||||
],
|
||||
{
|
||||
markDeleted: true,
|
||||
disallowExtraObjects: true,
|
||||
}
|
||||
);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user