Change donations db migration from CREATE to MERGE to work in all circumstances

This commit is contained in:
Wolfgang Huß 2021-09-20 11:05:41 +02:00
parent 66eaf1a478
commit 8295ec5827
2 changed files with 1 additions and 2 deletions

View File

@ -174,7 +174,6 @@ $ yarn run db:migrate up
**Beware**: We have no multiple database setup at the moment. We clean the
database after each test, running the tests will wipe out all your data!
{% tabs %}
{% tab title="Docker" %}

View File

@ -14,7 +14,7 @@ export async function up(next) {
const donationId = uuid()
await transaction.run(
`
CREATE (donationInfo:Donations)
MERGE (donationInfo:Donations)
SET donationInfo.id = $donationId
SET donationInfo.createdAt = toString(datetime())
SET donationInfo.updatedAt = donationInfo.createdAt