Skip to content

Instantly share code, notes, and snippets.

@luizkowalski
Created May 20, 2014 18:53
Show Gist options
  • Save luizkowalski/6e80a8c9b7a978548bfe to your computer and use it in GitHub Desktop.
Save luizkowalski/6e80a8c9b7a978548bfe to your computer and use it in GitHub Desktop.
(1.0ms) BEGIN
SQL (1.6ms) INSERT INTO "movimentacaocontabil" ("avulsa", "dataalteracao", "datacadastro", "datamovimentacao", "empresa_id", "filial", "lote", "valor") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["avulsa", "t"], ["dataalteracao", "2014-05-20 18:50:25.841362"], ["datacadastro", "2014-05-20 18:50:25.841078"], ["datamovimentacao", "2014-05-19"], ["empresa_id", 32], ["filial", "f"], ["lote", 783], ["valor", "5160.69"]]
SQL (1.8ms) INSERT INTO "lancamentocontabil" ("conta_id", "datacadastro", "datalancamento", "empresa_id", "filial", "historico", "tipo", "valor") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["conta_id", 406258], ["datacadastro", "2014-05-20 18:50:25.863252"], ["datalancamento", "2014-05-19 03:00:00.000000"], ["empresa_id", 32], ["filial", "f"], ["historico", "PROGER FINANCIAMENTO PLATAFORMAS"], ["tipo", "D"], ["valor", "5160.69"]]
SQL (2.5ms) INSERT INTO "movimentacaocontabil_lancamentocontabil" DEFAULT VALUES RETURNING "movimentacaocontabil_id"
PG::NotNullViolation: ERROR: null value in column "movimentacaocontabil_id" violates not-null constraint
: INSERT INTO "movimentacaocontabil_lancamentocontabil" DEFAULT VALUES RETURNING "movimentacaocontabil_id"
(1.0ms) ROLLBACK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment