-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ecd2802
commit 6970e08
Showing
78 changed files
with
5,849 additions
and
1,715 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* Atualizacao para a versao 1.04 */ | ||
|
||
/* Adicionando o campo de venda na troca, para que a venda possa ter mais de uma troca */ | ||
ALTER TABLE ecf_troca ADD COLUMN ecf_venda_id int(11) DEFAULT NULL BEFORE ecf_troca_cliente; | ||
ALTER TABLE ecf_troca ADD CONSTRAINT FK_ecf_troca_1 FOREIGN KEY (ecf_venda_id) REFERENCES ecf_venda (ecf_venda_id) ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
|
||
/* Setando as vendas nas trocas */ | ||
UPDATE ecf_troca AS t SET t.ecf_venda_id = (SELECT v.ecf_venda_id FROM ecf_venda AS v WHERE NOT v.ecf_troca_id IS NULL AND v.ecf_troca_id = t.ecf_troca_id); | ||
|
||
/* Deletando o campo de troca da venda */ | ||
ALTER TABLE ecf_venda DROP CONSTRAINT FK_ecf_venda_6; | ||
ALTER TABLE ecf_venda DROP COLUMN ecf_troca_id; | ||
|
||
/* Adicionando o campo para identificar a venda ao ECF usado */ | ||
ALTER TABLE ecf_venda ADD COLUMN ecf_impressora_id int(11) NOT NULL BEFORE ecf_z_id; | ||
UPDATE ecf_venda SET ecf_impressora_id = (SELECT ecf_impressora_id FROM ecf_impressora); | ||
ALTER TABLE ecf_venda ADD CONSTRAINT FK_ecf_venda_6 FOREIGN KEY (ecf_impressora_id) REFERENCES ecf_impressora (ecf_impressora_id) ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
|
||
/* Adicionando o campo de sinc na venda, pra que possa fazr o sincronismo isolado de cada venda */ | ||
ALTER TABLE ecf_venda ADD COLUMN ecf_venda_sinc bit(1) NOT NULL BEFORE ecf_venda_observacao; | ||
UPDATE ecf_venda SET ecf_venda_sinc = 1; | ||
|
||
/* Adicionando o campo da leituraZ no documento, para que possa ficar vinculado */ | ||
ALTER TABLE ecf_documento ADD COLUMN ecf_z_id int(11) DEFAULT NULL BEFORE ecf_documento_usuario; | ||
ALTER TABLE ecf_documento ADD CONSTRAINT FK_ecf_documento_2 FOREIGN KEY (ecf_z_id) REFERENCES ecf_z (ecf_z_id) ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
UPDATE ecf_documento AS d SET d.ecf_z_id = (SELECT z.ecf_z_id FROM ecf_z AS z WHERE d.ecf_documento_data >= z.ecf_z_movimento AND d.ecf_documento_data <= z.ecf_z_emissao); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1oFIhFDWJwT9WDoGq9bpR38FP3Elk8N5dxBSUjxf+WRbECMHSlnrhZwtIkBlgzNtxKuJdDENKyLNMIOZ1WSzMjCu5V2GuWSj1FJabcneb9Tjzgg2zucjgDF23noB1JMGMS8rWNrYDa55QHCTL2jn4MCGrEkNulS3JD0WHghKF0DVhuTmX7IhiDxZjh5+tTjs7kK9CAjtVbtxt/WAZ4YlKSz4oLaXzLMSUFCMEHjFn3X367CK0y9RJwJ2zFReRqsFVT9bNVajnPtdivtCCPWjD6OsOcwvFNfRruVABXzRSjpc9iKNyTWUjDhkLCe7Bjomc6GexKC9ufASaPUPfBX2KoN0gGrmsH0kOvIZsb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zfMh6kGl6QIlfD2iGr3C3GYyMqyvsyQG7jlDMIxkRYdnLb4Fni30PTnhp3MFiw47grnuvXJl8fbtzrGtcY/+UjdSTE+uQA2eCJHHfgn7/qD1Q4xD6QGEYovUnM+sleKLKpZDNYg788TE7LIIn9L8pIgJEhcWcJGzN3k4Q4U5K8OopqJBDjwl3S3QEQ2lOgeI5ihlqyiEiRxQuReRnQHF9ZxsIbqizf7rrNauREFpDg4O8BGksrJCYwq+MuR94wtZN0nMbbN8BP995R/cTA== |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
10-23 10:55:44 jdbc[2]: exception | ||
org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "UPDATE ECF_TROCA,[*] ECF_VENDA SET ECF_TROCA.ECF_VENDA_ID = ECF_VENDA.ECF_VENDA_ID WHERE NOT ECF_VENDA.ECF_TROCA_ID IS NULL AND ECF_TROCA.ECF_TROCA_ID = ECF_VENDA.ECF_TROCA_ID "; expected "., AS, SET"; SQL statement: | ||
UPDATE ecf_troca, ecf_venda SET ecf_troca.ecf_venda_id = ecf_venda.ecf_venda_id WHERE NOT ecf_venda.ecf_troca_id IS NULL AND ecf_troca.ecf_troca_id = ecf_venda.ecf_troca_id [42001-170] | ||
10-23 10:55:44 jdbc[2]: exception | ||
org.h2.jdbc.JdbcSQLException: Constraint "FK_ECF_VENDA_6" not found; SQL statement: | ||
ALTER TABLE ecf_venda DROP CONSTRAINT FK_ecf_venda_6 [90057-170] | ||
at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) | ||
at org.h2.message.DbException.get(DbException.java:169) | ||
at org.h2.message.DbException.get(DbException.java:146) | ||
at org.h2.command.ddl.AlterTableDropConstraint.update(AlterTableDropConstraint.java:40) | ||
at org.h2.command.CommandContainer.update(CommandContainer.java:75) | ||
at org.h2.command.Command.executeUpdate(Command.java:230) | ||
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:177) | ||
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:152) | ||
at org.h2.server.web.WebApp.getResult(WebApp.java:1311) | ||
at org.h2.server.web.WebApp.query(WebApp.java:1001) | ||
at org.h2.server.web.WebApp$1.next(WebApp.java:964) | ||
at org.h2.server.web.WebApp$1.next(WebApp.java:953) | ||
at org.h2.server.web.WebThread.process(WebThread.java:166) | ||
at org.h2.server.web.WebThread.run(WebThread.java:93) | ||
at java.lang.Thread.run(Thread.java:724) | ||
10-23 11:03:02 jdbc[2]: exception | ||
org.h2.jdbc.JdbcSQLException: Column "V.ECF_VENDA_ID" not found; SQL statement: | ||
UPDATE ecf_troca t SET t.ecf_venda_id = (SELECT v.ecf_venda_id WHERE NOT v.ecf_troca_id IS NULL AND v.ecf_troca_id = t.ecf_troca_id) [42122-170] | ||
at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) | ||
at org.h2.message.DbException.get(DbException.java:169) | ||
at org.h2.message.DbException.get(DbException.java:146) | ||
at org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:141) | ||
at org.h2.command.dml.Select.prepare(Select.java:799) | ||
at org.h2.expression.Subquery.optimize(Subquery.java:69) | ||
at org.h2.command.dml.Update.prepare(Update.java:184) | ||
at org.h2.command.Parser.prepareCommand(Parser.java:218) | ||
at org.h2.engine.Session.prepareLocal(Session.java:414) | ||
at org.h2.engine.Session.prepareCommand(Session.java:363) | ||
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1116) | ||
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:164) | ||
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:152) | ||
at org.h2.server.web.WebApp.getResult(WebApp.java:1311) | ||
at org.h2.server.web.WebApp.query(WebApp.java:1001) | ||
at org.h2.server.web.WebApp$1.next(WebApp.java:964) | ||
at org.h2.server.web.WebApp$1.next(WebApp.java:953) | ||
at org.h2.server.web.WebThread.process(WebThread.java:166) | ||
at org.h2.server.web.WebThread.run(WebThread.java:93) | ||
at java.lang.Thread.run(Thread.java:724) | ||
10-23 11:04:41 jdbc[2]: exception | ||
org.h2.jdbc.JdbcSQLException: Constraint "FK_ECF_VENDA_6" not found; SQL statement: | ||
ALTER TABLE ecf_venda DROP CONSTRAINT FK_ecf_venda_6 [90057-170] | ||
at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) | ||
at org.h2.message.DbException.get(DbException.java:169) | ||
at org.h2.message.DbException.get(DbException.java:146) | ||
at org.h2.command.ddl.AlterTableDropConstraint.update(AlterTableDropConstraint.java:40) | ||
at org.h2.command.CommandContainer.update(CommandContainer.java:75) | ||
at org.h2.command.Command.executeUpdate(Command.java:230) | ||
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:177) | ||
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:152) | ||
at org.h2.server.web.WebApp.getResult(WebApp.java:1311) | ||
at org.h2.server.web.WebApp.query(WebApp.java:1001) | ||
at org.h2.server.web.WebApp$1.next(WebApp.java:964) | ||
at org.h2.server.web.WebApp$1.next(WebApp.java:953) | ||
at org.h2.server.web.WebThread.process(WebThread.java:166) | ||
at org.h2.server.web.WebThread.run(WebThread.java:93) | ||
at java.lang.Thread.run(Thread.java:724) |
Oops, something went wrong.