ant create.database
Buildfile: build.xml
init:
create.database:
init:
database.lib:
clean:
[delete] Deleting directory /home/iperdomo/workspaces/branches/ajaxgrids/ajaxgrids/src-db/build/classes
[delete] Deleting directory /home/iperdomo/workspaces/branches/ajaxgrids/ajaxgrids/src-db/build/lib
[delete] Deleting directory /home/iperdomo/workspaces/branches/ajaxgrids/ajaxgrids/src-db/docs
init:
[mkdir] Created dir: /home/iperdomo/workspaces/branches/ajaxgrids/ajaxgrids/src-db/build/classes
[mkdir] Created dir: /home/iperdomo/workspaces/branches/ajaxgrids/ajaxgrids/src-db/build/lib
[mkdir] Created dir: /home/iperdomo/workspaces/branches/ajaxgrids/ajaxgrids/src-db/docs
compile:
[javac] Compiling 4 source files to /home/iperdomo/workspaces/branches/ajaxgrids/ajaxgrids/src-db/build/classes
build.jar:
[jar] Building jar: /home/iperdomo/workspaces/branches/ajaxgrids/ajaxgrids/src-db/build/lib/dbmanager.jar
jar:
[copy] Copying 1 file to /home/iperdomo/workspaces/branches/ajaxgrids/ajaxgrids/database/lib
create.database:
clean.database.POSTGRE:
[sql] Executing commands
[sql] Failed to execute: DROP DATABASE ajaxgrids
[sql] org.postgresql.util.PSQLException: ERROR: database "ajaxgrids" does not exist
[sql] 0 of 1 SQL statements executed successfully
[sql] Executing commands
[sql] Failed to execute: DROP ROLE tad_ajaxgrids
[sql] org.postgresql.util.PSQLException: ERROR: role "tad_ajaxgrids" does not exist
[sql] 0 of 1 SQL statements executed successfully
prepare.database:
POSTGRE.structure:
[sql] Executing commands
[sql] 2 of 2 SQL statements executed successfully
[sql] Executing commands
[sql] 1 of 1 SQL statements executed successfully
create.database.structure:
[createdatabase] Executing default prescript
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase] SELECT * FROM create_language('plpgsql')
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase] --DROP OPERATOR + (timestamptz, numeric) CASCADE;
[createdatabase] SELECT * FROM drop_operator('+','timestamptz','numeric')
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase] --DROP OPERATOR + (timestamptz, integer);
[createdatabase] --SELECT * FROM drop_operator('+','timestamptz','integer');
[createdatabase] --CREATE OPERATOR + (
[createdatabase] -- LEFTARG = timestamptz,
[createdatabase] -- RIGHTARG = integer,
[createdatabase] -- PROCEDURE = add_days,
[createdatabase] -- COMMUTATOR = +
[createdatabase] --)
[createdatabase] --/--END
[createdatabase]
[createdatabase] --DROP OPERATOR + (date, numeric);
[createdatabase] SELECT * FROM drop_operator('+','date','numeric')
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase] --DROP OPERATOR - (date, numeric);
[createdatabase] SELECT * FROM drop_operator('-','date','numeric')
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase] --DROP OPERATOR = (numeric, varchar);
[createdatabase] SELECT * FROM drop_operator('=','numeric','varchar');
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase] --DROP OPERATOR <= (numeric, varchar);
[createdatabase] SELECT * FROM drop_operator('<=','numeric','varchar');
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase] --DROP OPERATOR <= (timestamp, varchar);
[createdatabase] SELECT * FROM drop_operator('<=','timestamp','varchar');
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase] --DROP OPERATOR >= (timestamp, varchar);
[createdatabase] SELECT * FROM drop_operator('>=','timestamp','varchar');
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase] --DROP OPERATOR - (timestamptz,timestamptz);
[createdatabase] --CREATE OPERATOR - (
[createdatabase] -- LEFTARG = timestamptz,
[createdatabase] -- RIGHTARG = timestamptz,
[createdatabase] -- PROCEDURE = substract_days
[createdatabase] --)
[createdatabase] --/--END
[createdatabase]
[createdatabase] --DROP OPERATOR - (timestamptz, numeric)
[createdatabase] --/--END
[createdatabase]
[createdatabase] SELECT * FROM drop_operator('-','timestamptz','numeric')
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase] SELECT * FROM drop_view('DUAL')
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase] SELECT * FROM drop_view('USER_TABLES')
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase] --DROP VIEW USER_CONSTRAINTS
[createdatabase] --/--END
[createdatabase] SELECT * FROM drop_view('USER_CONSTRAINTS')
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase] --DROP VIEW USER_INDEXES
[createdatabase] --/--END
[createdatabase]
[createdatabase] SELECT * FROM drop_view('USER_INDEXES')
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase] --DROP VIEW USER_IND_COLUMNS
[createdatabase] --/--END
[createdatabase]
[createdatabase] SELECT * FROM drop_view('USER_IND_COLUMNS')
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase] SELECT * FROM drop_view('USER_OBJECTS')
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase]
[createdatabase]
[createdatabase] SELECT * FROM drop_view('USER_CONS_COLUMNS')
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase]
[createdatabase] --DROP VIEW USER_TAB_COLUMNS
[createdatabase] --/--END
[createdatabase]
[createdatabase] SELECT * FROM drop_view('USER_TAB_COLUMNS')
[createdatabase] SQL Command failed with: A result was returned when none was expected.
[createdatabase] -- END
[createdatabase]
[createdatabase] --DROP VIEW USER_TRIGGERS
[createdatabase] --/--END
[createdatabase]
[createdatabase] SELECT * FROM drop_view('USER_TRIGGERS')
[createdatabase] Executed 104 SQL command(s) with 18 error(s)
[createdatabase] Executing creation script
[createdatabase] for the complete database
[createdatabase] SQL Command failed with: ERROR: relation "c_invoice_v" does not exist
[createdatabase] -- END C_DEBT_PAYMENT_V
[createdatabase] -- -----------------------------------------------------------------------
[createdatabase] -- VIEW C_INVOICELINE_V
[createdatabase] -- -----------------------------------------------------------------------
[createdatabase] -- SCRIPT OPTIONS (FORCE = TRUE)
[createdatabase] CREATE VIEW C_INVOICELINE_V AS SELECT il.ad_client_id, il.ad_org_id, il.c_invoiceline_id, i.c_invoice_id, i.salesrep_id, i.c_bpartner_id, il.m_product_id, i.documentno, i.dateinvoiced, i.dateacct, i.issotrx, i.docstatus, round(i.multiplier * il.linenetamt, 2) AS linenetamt, round(i.multiplier * il.pricelist * il.qtyinvoiced, 2) AS linelistamt,
[createdatabase] CASE
[createdatabase] WHEN il.pricelimit IS NULL THEN round(i.multiplier * il.linenetamt, 2)
[createdatabase] ELSE round(i.multiplier * il.pricelimit * il.qtyinvoiced, 2)
[createdatabase] END AS linelimitamt, round(i.multiplier * il.pricelist * il.qtyinvoiced - il.linenetamt, 2) AS linediscountamt,
[createdatabase] CASE
[createdatabase] WHEN il.pricelimit IS NULL THEN 0
[createdatabase] ELSE round(i.multiplier * il.linenetamt - il.pricelimit * il.qtyinvoiced, 2)
[createdatabase] END AS lineoverlimitamt, il.qtyinvoiced, il.line, il.c_orderline_id, il.c_uom_id
[createdatabase] FROM c_invoice_v i, c_invoiceline il
[createdatabase] WHERE i.c_invoice_id = il.c_invoice_id
[createdatabase] SQL Command failed with: ERROR: syntax error at or near "="
[createdatabase] -- END C_BP_GROUP_TRG
[createdatabase] -- -----------------------------------------------------------------------
[createdatabase] -- FUNCTION FOR TRIGGER C_BP_SALCATEGORY_TRG
[createdatabase] -- -----------------------------------------------------------------------
[createdatabase] CREATE FUNCTION C_BP_SALCATEGORY_TRG()
[createdatabase] RETURNS trigger
[createdatabase] AS $BODY$ DECLARE
[createdatabase]
[createdatabase]
[createdatabase] /*************************************************************************
[createdatabase] * The contents of this file are subject to the Openbravo Public License
[createdatabase] * Version 1.0 (the "License"), being the Mozilla Public License
[createdatabase] * Version 1.1 with a permitted attribution clause; you may not use this
[createdatabase] * file except in compliance with the License. You may obtain a copy of
[createdatabase] * the License at http://www.openbravo.com/legal/license.html
[createdatabase] * Software distributed under the License is distributed on an "AS IS"
[createdatabase] * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
[createdatabase] * License for the specific language governing rights and limitations
[createdatabase] * under the License.
[createdatabase] * The Original Code is Openbravo ERP.
[createdatabase] * The Initial Developer of the Original Code is Openbravo SL
[createdatabase] * All portions are Copyright (C) 2001-2008 Openbravo SL
[createdatabase] * All Rights Reserved.
[createdatabase] * Contributor(s): ______________________________________.
[createdatabase] ************************************************************************/
[createdatabase]
[createdatabase] v_isCostApplied CHAR(1);
[createdatabase] v_count NUMERIC;
[createdatabase]
[createdatabase] BEGIN
[createdatabase]
[createdatabase]
[createdatabase] IF (TG_OP = 'UPDATE' OR TG_OP = 'INSERT') THEN
[createdatabase]
[createdatabase] -- <<-- <<-- <<< .working
[createdatabase] SELECT ISCOSTAPPLIED INTO v_isCostApplied
[createdatabase] FROM C_SALARY_CATEGORY
[createdatabase] WHERE AD_ORG_ID IN (0,NEW.AD_ORG_ID)
[createdatabase] AND AD_CLIENT_ID IN (0,NEW.AD_CLIENT_ID)
[createdatabase] AND C_SALARY_CATEGORY_ID=NEW.C_SALARY_CATEGORY_ID;
[createdatabase] =======
[createdatabase] SELECT ISCOSTAPPLIED INTO v_isCostApplied
[createdatabase] FROM C_SALARY_CATEGORY
[createdatabase] WHERE C_SALARY_CATEGORY_ID=NEW.C_SALARY_CATEGORY_ID;
[createdatabase] >>>>>>> .merge-right.r3246
[createdatabase]
[createdatabase] -- <<-- <<-- <<< .working
[createdatabase] IF (v_isCostApplied='Y') THEN
[createdatabase]
[createdatabase] SELECT COUNT(*) INTO v_count
[createdatabase] FROM C_SALARY_CATEGORY_COST
[createdatabase] WHERE AD_ORG_ID IN (0,NEW.AD_ORG_ID)
[createdatabase] AND AD_CLIENT_ID IN (0,NEW.AD_CLIENT_ID)
[createdatabase] AND C_SALARY_CATEGORY_ID=NEW.C_SALARY_CATEGORY_ID;
[createdatabase]
[createdatabase] IF (v_count=0) THEN
[createdatabase] RAISE EXCEPTION '%','@Salary Category without cost@'; --OBTG:-20519
[createdatabase] ELSE
[createdatabase]
[createdatabase] SELECT COUNT(*) INTO v_count
[createdatabase] FROM C_SALARY_CATEGORY_COST
[createdatabase] WHERE AD_ORG_ID IN (0,NEW.AD_ORG_ID)
[createdatabase] AND AD_CLIENT_ID IN (0,NEW.AD_CLIENT_ID)
[createdatabase] AND C_SALARY_CATEGORY_ID=NEW.C_SALARY_CATEGORY_ID
[createdatabase] AND DATEFROM<=NEW.DATEFROM;
[createdatabase]
[createdatabase] IF (v_count=0) THEN
[createdatabase] RAISE EXCEPTION '%','@Cost not available for Dates@'; --OBTG:-20518
[createdatabase] END IF;
[createdatabase] END IF;
[createdatabase] END IF;
[createdatabase] =======
[createdatabase] IF (v_isCostApplied='Y') THEN
[createdatabase]
[createdatabase] SELECT COUNT(*) INTO v_count
[createdatabase] FROM C_SALARY_CATEGORY_COST
[createdatabase] WHERE C_SALARY_CATEGORY_ID=NEW.C_SALARY_CATEGORY_ID;
[createdatabase]
[createdatabase] IF (v_count=0) THEN
[createdatabase] RAISE EXCEPTION '%','@Salary Category without cost@'; --OBTG:-20519
[createdatabase] ELSE
[createdatabase]
[createdatabase] SELECT COUNT(*) INTO v_count
[createdatabase] FROM C_SALARY_CATEGORY_COST
[createdatabase] WHERE C_SALARY_CATEGORY_ID=NEW.C_SALARY_CATEGORY_ID
[createdatabase] AND DATEFROM<=NEW.DATEFROM;
[createdatabase]
[createdatabase] IF (v_count=0) THEN
[createdatabase] RAISE EXCEPTION '%','@Cost not available for Dates@'; --OBTG:-20518
[createdatabase] END IF;
[createdatabase] END IF;
[createdatabase] END IF;
[createdatabase] >>>>>>> .merge-right.r3246
[createdatabase] END IF;
[createdatabase]
[createdatabase]
[createdatabase] IF TG_OP = 'DELETE' THEN RETURN OLD; ELSE RETURN NEW; END IF;
[createdatabase]
[createdatabase] END
[createdatabase]
[createdatabase] ; $BODY$ LANGUAGE plpgsql;
[createdatabase] SQL Command failed with: ERROR: function c_bp_salcategory_trg() does not exist
[createdatabase] -- END C_BP_SALCATEGORY_TRG
[createdatabase] -- -----------------------------------------------------------------------
[createdatabase] -- TRIGGER C_BP_SALCATEGORY_TRG
[createdatabase] -- -----------------------------------------------------------------------
[createdatabase] CREATE TRIGGER C_BP_SALCATEGORY_TRG
[createdatabase] BEFORE INSERT OR UPDATE
[createdatabase] ON C_BP_SALCATEGORY FOR EACH ROW
[createdatabase] EXECUTE PROCEDURE C_BP_SALCATEGORY_TRG()
[createdatabase] Executed 4883 SQL command(s) with 3 error(s)
[createdatabase] Executed 1 forced SQL command(s) with 0 error(s)
[createdatabase] Executing default postscript
[createdatabase] Executed 6 SQL command(s) with 0 error(s)
database.poststructure.POSTGRE:
import.database.data:
database.preimport.POSTGRE:
[sql] Executing commands
[sql] 1 of 1 SQL statements executed successfully
[importdata] Starting function and trigger standarization.
[importdata] Model loaded from database.
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
[importdata] Executed 1 SQL command(s) with 0 error(s)
database.postimport.POSTGRE:
[sql] Executing commands
[sql] 1 of 1 SQL statements executed successfully
database.postcreate.POSTGRE:
[sql] Executing commands
[sql] 4 of 4 SQL statements executed successfully
import.database.masterdata:
database.preimport.POSTGRE:
[sql] Executing commands
[sql] 1 of 1 SQL statements executed successfully
[importdata] Starting function and trigger standarization.
[importdata] Model loaded from database.
database.postimport.POSTGRE:
[sql] Executing commands
[sql] 1 of 1 SQL statements executed successfully
database.postcreate.POSTGRE:
[sql] Executing commands
[sql] 4 of 4 SQL statements executed successfully
import.database.sampledata:
database.preimport.POSTGRE:
[sql] Executing commands
[sql] 1 of 1 SQL statements executed successfully
[importdata] Starting function and trigger standarization.
[importdata] Model loaded from database.
database.postimport.POSTGRE:
[sql] Executing commands
[sql] 1 of 1 SQL statements executed successfully
database.postcreate.POSTGRE:
[sql] Executing commands
[sql] 4 of 4 SQL statements executed successfully
BUILD SUCCESSFUL
Total time: 40 minutes 49 seconds