-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from sombriks/develop
teste de release - pagamentos e transferências
- Loading branch information
Showing
31 changed files
with
519 additions
and
193 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
*.private.env.json | ||
*.save | ||
.idea | ||
node_modules |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules | |
.vscode | ||
dist | ||
coverage | ||
.idea |
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
21 changes: 21 additions & 0 deletions
21
...e-node-koa/app/config/db/migrations/20240609112011_adiciona_flag_movimentacao_interna.mjs
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,21 @@ | ||
/** | ||
* @param { import('knex').Knex } knex | ||
* @returns { Promise<void> } | ||
*/ | ||
export const up = async (knex) => | ||
knex.schema.table('movimentacao', tb => { | ||
tb.dropNullable('categoria_id') | ||
tb.foreign('categoria_id').references('categoria.id').onDelete('cascade') | ||
tb.boolean('interna').defaultTo(false) | ||
.comment('indica uma movimentação entre contas') | ||
}) | ||
|
||
/** | ||
* @param { import('knex').Knex } knex | ||
* @returns { Promise<void> } | ||
*/ | ||
export const down = async (knex) => | ||
knex.schema.table('movimentacao', tb => { | ||
tb.setNullable('categoria_id') | ||
tb.dropColumn('interna') | ||
}) |
16 changes: 16 additions & 0 deletions
16
service-node-koa/app/config/db/migrations/20240609120432_novos_modelos_categoria.mjs
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,16 @@ | ||
/** | ||
* @param { import('knex').Knex } knex | ||
* @returns { Promise<void> } | ||
*/ | ||
export const up = async (knex) => | ||
knex('modelocategoria').insert([ | ||
{ descricao: 'ESTUDO', cor: '#A0FF16' }, { descricao: 'TRANSFERENCIA', cor: '#AAEEEE' } | ||
]) | ||
|
||
/** | ||
* @param { import('knex').Knex } knex | ||
* @returns { Promise<void> } | ||
*/ | ||
export const down = async (knex) => | ||
knex('modelocategoria').del() | ||
.whereIn('descricao', ['ESTUDO', 'TRANSFERENCIA']) |
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
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
Oops, something went wrong.