Update for pg - Internal changes for DB Migration / DDL generation #369

This commit is contained in:
Robin Bygrave
2015-08-05 20:59:09 +12:00
parent 22407506ff
commit 689d201b04
92 changed files with 2976 additions and 661 deletions
@@ -25,7 +25,12 @@ public class ResetBasicData {
server.execute(new TxRunnable() {
public void run() {
me.deleteAll();
if (server.find(Product.class).findRowCount() > 0) {
// we can't really delete this base data as
// the test rely on the products being in there
return;
}
//me.deleteAll();
me.insertCountries();
me.insertProducts();
me.insertTestCustAndOrders();
@@ -66,8 +71,12 @@ public class ResetBasicData {
public void insertCountries() {
server.execute(new TxRunnable() {
if (server.find(Country.class).findRowCount() > 0) {
return;
}
server.execute(new TxRunnable() {
public void run() {
Country c = new Country();
c.setCode("NZ");
@@ -84,7 +93,10 @@ public class ResetBasicData {
public void insertProducts() {
if (server.find(Product.class).findRowCount() > 0) {
return;
}
server.execute(new TxRunnable() {
public void run() {
Product p = new Product();