aggiunti campi cod_pro e partita_mag_prod nella tabella ctb_movr_coan
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20241022102117 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement("ALTER TABLE ctb_movr_coan ADD cod_prod VARCHAR(15) , partita_mag_prod VARCHAR(20)\n" +
|
||||
"ALTER TABLE ctb_movr_coan ADD CONSTRAINT FK_ctb_movr_coan_cod FOREIGN KEY (cod_prod) REFERENCES mtb_aart(cod_mart)\n" +
|
||||
"ALTER TABLE ctb_movr_coan ADD CONSTRAINT FK_ctb_movr_coan_partita FOREIGN KEY (cod_prod, partita_mag_prod ) REFERENCES mtb_partita_mag(cod_mart, partita_mag)");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user