Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Release/1.141.1 (#863)

Thomas Kaul8ff811ed28a5
diff --git a/CHANGELOG.md b/CHANGELOG.md
index aa685b4f75..494fb2233f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## 1.141.1 - 24.04.2022
+
+### Added
+
+- Added the database migration
+
+### Todo
+
+- Apply data migration (`yarn database:migrate`)
+
## 1.141.0 - 24.04.2022
### Added
diff --git a/package.json b/package.json
index 7b6b45c130..2b7fba001e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ghostfolio",
- "version": "1.141.0",
+ "version": "1.141.1",
"homepage": "https://ghostfol.io",
"license": "AGPL-3.0",
"scripts": {
diff --git a/prisma/migrations/20220424152051_added_tags_to_order/migration.sql b/prisma/migrations/20220424152051_added_tags_to_order/migration.sql
new file mode 100644
index 0000000000..2df0846525
--- /dev/null
+++ b/prisma/migrations/20220424152051_added_tags_to_order/migration.sql
@@ -0,0 +1,28 @@
+-- CreateTable
+CREATE TABLE "Tag" (
+ "id" TEXT NOT NULL,
+ "name" TEXT NOT NULL,
+
+ CONSTRAINT "Tag_pkey" PRIMARY KEY ("id")
+);
+
+-- CreateTable
+CREATE TABLE "_OrderToTag" (
+ "A" TEXT NOT NULL,
+ "B" TEXT NOT NULL
+);
+
+-- CreateIndex
+CREATE UNIQUE INDEX "Tag_name_key" ON "Tag"("name");
+
+-- CreateIndex
+CREATE UNIQUE INDEX "_OrderToTag_AB_unique" ON "_OrderToTag"("A", "B");
+
+-- CreateIndex
+CREATE INDEX "_OrderToTag_B_index" ON "_OrderToTag"("B");
+
+-- AddForeignKey
+ALTER TABLE "_OrderToTag" ADD FOREIGN KEY ("A") REFERENCES "Order"("id") ON DELETE CASCADE ON UPDATE CASCADE;
+
+-- AddForeignKey
+ALTER TABLE "_OrderToTag" ADD FOREIGN KEY ("B") REFERENCES "Tag"("id") ON DELETE CASCADE ON UPDATE CASCADE;