mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
adapt to different table name, fix
This commit is contained in:
parent
73d688eeb3
commit
eb57991f03
2
.github/workflows/test_dht_node.yml
vendored
2
.github/workflows/test_dht_node.yml
vendored
@ -43,7 +43,7 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: DHT-Node | Lint
|
||||
run: cd dht-node && yarn && yarn run lint
|
||||
run: cd database && yarn && cd ../dht-node && yarn && yarn run lint
|
||||
|
||||
unit_test:
|
||||
name: Unit Tests - DHT Node
|
||||
|
||||
3
.github/workflows/test_e2e.yml
vendored
3
.github/workflows/test_e2e.yml
vendored
@ -14,7 +14,8 @@ jobs:
|
||||
run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach mariadb
|
||||
|
||||
- name: Prepare test system
|
||||
run: sudo chown runner:docker -R *
|
||||
run: |
|
||||
sudo chown runner:docker -R *
|
||||
cd database && yarn
|
||||
cd ../backend && yarn
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
export async function upgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||
await queryFn(
|
||||
`INSERT INTO gradido_community.contributions
|
||||
`INSERT INTO contributions
|
||||
(user_id, created_at, contribution_date, memo, amount, moderator_id, confirmed_by, confirmed_at, transaction_id)
|
||||
SELECT
|
||||
user_id,
|
||||
@ -18,12 +18,12 @@ SELECT
|
||||
balance_date AS confirmed_at,
|
||||
id
|
||||
FROM
|
||||
gradido_community.transactions
|
||||
transactions
|
||||
WHERE
|
||||
type_id = 1
|
||||
AND NOT EXISTS(
|
||||
SELECT * FROM gradido_community.contributions
|
||||
WHERE gradido_community.contributions.transaction_id = gradido_community.transactions.id);`,
|
||||
SELECT * FROM contributions
|
||||
WHERE contributions.transaction_id = transactions.id);`,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import { createPool } from 'mysql'
|
||||
import { Migration } from 'ts-mysql-migrate'
|
||||
import { clearDatabase } from './clear'
|
||||
import { latestDbVersion } from './config/detectLastDBVersion'
|
||||
import path from 'path'
|
||||
import path from 'node:path'
|
||||
|
||||
const run = async (command: string) => {
|
||||
if (command === 'clear') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user