Damien O'Hara
02/16/2023, 7:15 AMDamien O'Hara
02/16/2023, 7:17 AMDamien O'Hara
02/16/2023, 7:17 AMEleanor Leung
03/31/2023, 8:18 AMILIKE
but there's no support for it yet?Eleanor Leung
03/31/2023, 8:19 AMEleanor Leung
03/31/2023, 8:19 AMDamien O'Hara
03/31/2023, 8:22 AMDamien O'Hara
03/31/2023, 8:23 AMEleanor Leung
03/31/2023, 8:26 AMEleanor Leung
03/31/2023, 8:26 AMOperationFixity
?Damien O'Hara
03/31/2023, 8:31 AMX
should produce sql expressions like X(a, b)
, X a
, a X
, a X b
etcDamien O'Hara
03/31/2023, 8:31 AMclass MyOp("ILIKE"): InfixOperation()
Eleanor Leung
03/31/2023, 8:32 AMDamien O'Hara
03/31/2023, 8:38 AMEleanor Leung
03/31/2023, 8:39 AMEleanor Leung
03/31/2023, 8:39 AMEleanor Leung
03/31/2023, 8:39 AMDamien O'Hara
03/31/2023, 8:39 AMDamien O'Hara
03/31/2023, 8:39 AMEleanor Leung
03/31/2023, 8:40 AMNathan Castlehow
05/14/2024, 1:57 AMDeclareStrategy.APPLY_ALL
strategy + MysqlDataSource
data source.
We can see in the koalaql code base that we do attempt to pass the drop table changes into the actual reconciliation step
Get generated changes
ReconcileTables.kt
result
.of(drop)
.tables
.dropped
.addAll(changes.tables.dropped)
Apply changes
JdbcDataSource.kt
is ReconcileTables -> applyDdlFromChanges(declareBy.filterChanges(
changes = detectChanges(tables)
))
It just appears that for the MysqlDataSource we aren't generating the table drop changes which can then be applied (To be generated in MysqlSchemaDiff.kt)?
What would the desired behaviour here be?Damien O'Hara
05/14/2024, 11:26 AMdetectChanges
is not considered to be exhaustive, so Koala can't use it to determine which tables have been removed (i.e. that might still exist, but simply weren't passed in to that method)
In future I'd be open to some option for comparing an "entire" schema, but auto dropping tables is so dangerous I'd want to consider very carefully how this would be approachedNathan Castlehow
05/14/2024, 11:47 AM