-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bot): make strategy logging optional
- Loading branch information
Showing
6 changed files
with
43 additions
and
9 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
packages/prisma/src/migrations/20240909034411_bot_add_logging_column/migration.sql
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,28 @@ | ||
-- RedefineTables | ||
PRAGMA defer_foreign_keys=ON; | ||
PRAGMA foreign_keys=OFF; | ||
CREATE TABLE "new_Bot" ( | ||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | ||
"type" TEXT NOT NULL, | ||
"name" TEXT NOT NULL, | ||
"label" TEXT, | ||
"symbol" TEXT NOT NULL, | ||
"enabled" BOOLEAN NOT NULL DEFAULT false, | ||
"logging" BOOLEAN NOT NULL DEFAULT true, | ||
"template" TEXT NOT NULL, | ||
"timeframe" TEXT, | ||
"processing" BOOLEAN NOT NULL DEFAULT false, | ||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"settings" TEXT NOT NULL, | ||
"state" TEXT NOT NULL DEFAULT '{}', | ||
"exchangeAccountId" INTEGER NOT NULL, | ||
"ownerId" INTEGER NOT NULL, | ||
CONSTRAINT "Bot_exchangeAccountId_fkey" FOREIGN KEY ("exchangeAccountId") REFERENCES "ExchangeAccount" ("id") ON DELETE RESTRICT ON UPDATE CASCADE, | ||
CONSTRAINT "Bot_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE | ||
); | ||
INSERT INTO "new_Bot" ("createdAt", "enabled", "exchangeAccountId", "id", "label", "name", "ownerId", "processing", "settings", "state", "symbol", "template", "timeframe", "type") SELECT "createdAt", "enabled", "exchangeAccountId", "id", "label", "name", "ownerId", "processing", "settings", "state", "symbol", "template", "timeframe", "type" FROM "Bot"; | ||
DROP TABLE "Bot"; | ||
ALTER TABLE "new_Bot" RENAME TO "Bot"; | ||
CREATE UNIQUE INDEX "Bot_label_key" ON "Bot"("label"); | ||
PRAGMA foreign_keys=ON; | ||
PRAGMA defer_foreign_keys=OFF; |
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
Submodule pro
updated
from 5c300a to 55de79