diff --git a/Dockerfile b/Dockerfile
index a56fc70..0460861 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,7 +7,7 @@ RUN go mod download
# Copy the source code. Note the slash at the end, as explained in
# https://docs.docker.com/engine/reference/builder/#copy
-COPY backend/*.go ./
+COPY backend/ ./
# Build
RUN CGO_ENABLED=0 GOOS=linux go build .
@@ -39,7 +39,6 @@ ENV GO_ENV=production
COPY start_server.sh .
COPY --from=prerelease /usr/src/app/build .
COPY --from=gobuild /usr/src/app/brawlset_server .
-COPY backend/pb_migrations ./pb_migrations
# run the app
EXPOSE 8090
diff --git a/backend/main.go b/backend/main.go
index 73b18a9..db9216a 100644
--- a/backend/main.go
+++ b/backend/main.go
@@ -5,6 +5,8 @@ import (
"log"
"github.com/pocketbase/pocketbase"
+ "github.com/pocketbase/pocketbase/plugins/migratecmd"
+ _ "brawlset_server/migrations"
)
// Copied from https://github.com/s-petr/longhabit/blob/main/backend/main.go
@@ -35,6 +37,10 @@ func newApplication() *application {
func main() {
app := newApplication()
+ migratecmd.MustRegister(app.pb, app.pb.RootCmd, migratecmd.Config{
+ Dir: "migrations",
+ })
+
app.SetupCache()
app.SetupCrons()
app.SetupRoutes()
diff --git a/backend/migrations/1745506289_collections_snapshot.go b/backend/migrations/1745506289_collections_snapshot.go
new file mode 100644
index 0000000..d016120
--- /dev/null
+++ b/backend/migrations/1745506289_collections_snapshot.go
@@ -0,0 +1,555 @@
+package migrations
+
+import (
+ "github.com/pocketbase/pocketbase/core"
+ m "github.com/pocketbase/pocketbase/migrations"
+)
+
+func init() {
+ m.Register(func(app core.App) error {
+ jsonData := `[
+ {
+ "id": "pbc_749385185",
+ "listRule": null,
+ "viewRule": null,
+ "createRule": null,
+ "updateRule": null,
+ "deleteRule": null,
+ "name": "brawlset",
+ "type": "base",
+ "fields": [
+ {
+ "autogeneratePattern": "[a-z0-9]{15}",
+ "hidden": false,
+ "id": "text3208210256",
+ "max": 15,
+ "min": 15,
+ "name": "id",
+ "pattern": "^[a-z0-9]+$",
+ "presentable": false,
+ "primaryKey": true,
+ "required": true,
+ "system": true,
+ "type": "text"
+ },
+ {
+ "autogeneratePattern": "",
+ "hidden": false,
+ "id": "text1579384326",
+ "max": 0,
+ "min": 0,
+ "name": "name",
+ "pattern": "",
+ "presentable": true,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ },
+ {
+ "autogeneratePattern": "",
+ "hidden": false,
+ "id": "text3273110370",
+ "max": 0,
+ "min": 0,
+ "name": "sanitized_name",
+ "pattern": "",
+ "presentable": false,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ },
+ {
+ "cascadeDelete": false,
+ "collectionId": "pbc_3912384429",
+ "hidden": false,
+ "id": "relation2492286417",
+ "maxSelect": 999,
+ "minSelect": 0,
+ "name": "sets",
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "relation"
+ }
+ ],
+ "indexes": [],
+ "system": false
+ },
+ {
+ "id": "pbc_1905410326",
+ "listRule": null,
+ "viewRule": null,
+ "createRule": null,
+ "updateRule": null,
+ "deleteRule": null,
+ "name": "carte",
+ "type": "base",
+ "fields": [
+ {
+ "autogeneratePattern": "[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}",
+ "hidden": false,
+ "id": "text3208210256",
+ "max": 36,
+ "min": 36,
+ "name": "id",
+ "pattern": "^[a-z0-9\\-]+$",
+ "presentable": false,
+ "primaryKey": true,
+ "required": true,
+ "system": true,
+ "type": "text"
+ },
+ {
+ "autogeneratePattern": "",
+ "hidden": false,
+ "id": "text1579384326",
+ "max": 0,
+ "min": 0,
+ "name": "name",
+ "pattern": "",
+ "presentable": true,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ },
+ {
+ "autogeneratePattern": "",
+ "hidden": false,
+ "id": "text3273110370",
+ "max": 0,
+ "min": 0,
+ "name": "sanitized_name",
+ "pattern": "",
+ "presentable": false,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ },
+ {
+ "autogeneratePattern": "",
+ "hidden": false,
+ "id": "text976907234",
+ "max": 0,
+ "min": 0,
+ "name": "layout",
+ "pattern": "",
+ "presentable": false,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ },
+ {
+ "exceptDomains": null,
+ "hidden": false,
+ "id": "url1456686396",
+ "name": "small_image",
+ "onlyDomains": null,
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "url"
+ },
+ {
+ "exceptDomains": null,
+ "hidden": false,
+ "id": "url2615033119",
+ "name": "small_image_back",
+ "onlyDomains": null,
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "url"
+ },
+ {
+ "exceptDomains": null,
+ "hidden": false,
+ "id": "url2291853061",
+ "name": "normal_image",
+ "onlyDomains": null,
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "url"
+ },
+ {
+ "exceptDomains": null,
+ "hidden": false,
+ "id": "url2961008824",
+ "name": "normal_image_back",
+ "onlyDomains": null,
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "url"
+ },
+ {
+ "autogeneratePattern": "",
+ "hidden": false,
+ "id": "text2363381545",
+ "max": 0,
+ "min": 0,
+ "name": "type",
+ "pattern": "",
+ "presentable": false,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ },
+ {
+ "hidden": false,
+ "id": "select3054531206",
+ "maxSelect": 5,
+ "name": "color_identity",
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "select",
+ "values": [
+ "B",
+ "W",
+ "R",
+ "G",
+ "U"
+ ]
+ },
+ {
+ "hidden": false,
+ "id": "date3520360348",
+ "max": "",
+ "min": "",
+ "name": "released_at",
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "date"
+ },
+ {
+ "cascadeDelete": false,
+ "collectionId": "pbc_3912384429",
+ "hidden": false,
+ "id": "relation3860080092",
+ "maxSelect": 1,
+ "minSelect": 0,
+ "name": "mtg_set",
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "relation"
+ },
+ {
+ "autogeneratePattern": "",
+ "hidden": false,
+ "id": "text3805467153",
+ "max": 0,
+ "min": 0,
+ "name": "set_code",
+ "pattern": "",
+ "presentable": true,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ },
+ {
+ "hidden": false,
+ "id": "number3402113753",
+ "max": null,
+ "min": null,
+ "name": "price",
+ "onlyInt": false,
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "number"
+ },
+ {
+ "exceptDomains": null,
+ "hidden": false,
+ "id": "url518645060",
+ "name": "cardmarket_url",
+ "onlyDomains": null,
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "url"
+ },
+ {
+ "hidden": false,
+ "id": "bool1734659578",
+ "name": "can_be_commander",
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "bool"
+ },
+ {
+ "hidden": false,
+ "id": "bool2605256118",
+ "name": "banned",
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "bool"
+ }
+ ],
+ "indexes": [],
+ "system": false
+ },
+ {
+ "id": "pbc_1755402631",
+ "listRule": "owner ?= @request.auth.id",
+ "viewRule": "owner ?= @request.auth.id",
+ "createRule": "@request.auth.id != \"\"",
+ "updateRule": "owner ?= @request.auth.id",
+ "deleteRule": "owner ?= @request.auth.id",
+ "name": "deck",
+ "type": "base",
+ "fields": [
+ {
+ "autogeneratePattern": "[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}",
+ "hidden": false,
+ "id": "text3208210256",
+ "max": 36,
+ "min": 36,
+ "name": "id",
+ "pattern": "^[a-z0-9\\-]+$",
+ "presentable": false,
+ "primaryKey": true,
+ "required": true,
+ "system": true,
+ "type": "text"
+ },
+ {
+ "autogeneratePattern": "",
+ "hidden": false,
+ "id": "text1579384326",
+ "max": 0,
+ "min": 0,
+ "name": "name",
+ "pattern": "",
+ "presentable": true,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ },
+ {
+ "exceptDomains": null,
+ "hidden": false,
+ "id": "url4101391790",
+ "name": "url",
+ "onlyDomains": null,
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "url"
+ },
+ {
+ "hidden": false,
+ "id": "select3054531206",
+ "maxSelect": 5,
+ "name": "color_identity",
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "select",
+ "values": [
+ "B",
+ "R",
+ "G",
+ "U",
+ "W"
+ ]
+ },
+ {
+ "cascadeDelete": false,
+ "collectionId": "_pb_users_auth_",
+ "hidden": false,
+ "id": "relation3479234172",
+ "maxSelect": 1,
+ "minSelect": 0,
+ "name": "owner",
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "relation"
+ },
+ {
+ "cascadeDelete": false,
+ "collectionId": "pbc_1905410326",
+ "hidden": false,
+ "id": "relation1121130682",
+ "maxSelect": 1,
+ "minSelect": 0,
+ "name": "commander",
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "relation"
+ },
+ {
+ "cascadeDelete": false,
+ "collectionId": "pbc_749385185",
+ "hidden": false,
+ "id": "relation1826942456",
+ "maxSelect": 1,
+ "minSelect": 0,
+ "name": "brawlset",
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "relation"
+ },
+ {
+ "hidden": false,
+ "id": "json3635975509",
+ "maxSize": 0,
+ "name": "cartes",
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "json"
+ },
+ {
+ "hidden": false,
+ "id": "autodate2990389176",
+ "name": "created",
+ "onCreate": true,
+ "onUpdate": false,
+ "presentable": false,
+ "system": false,
+ "type": "autodate"
+ },
+ {
+ "hidden": false,
+ "id": "autodate3332085495",
+ "name": "updated",
+ "onCreate": true,
+ "onUpdate": true,
+ "presentable": false,
+ "system": false,
+ "type": "autodate"
+ }
+ ],
+ "indexes": [],
+ "system": false
+ },
+ {
+ "id": "pbc_3912384429",
+ "listRule": "",
+ "viewRule": "",
+ "createRule": "",
+ "updateRule": "",
+ "deleteRule": "",
+ "name": "mtg_set",
+ "type": "base",
+ "fields": [
+ {
+ "autogeneratePattern": "[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}",
+ "hidden": false,
+ "id": "text3208210256",
+ "max": 36,
+ "min": 36,
+ "name": "id",
+ "pattern": "^[a-z0-9\\-]+$",
+ "presentable": false,
+ "primaryKey": true,
+ "required": true,
+ "system": true,
+ "type": "text"
+ },
+ {
+ "autogeneratePattern": "",
+ "hidden": false,
+ "id": "text1579384326",
+ "max": 0,
+ "min": 0,
+ "name": "name",
+ "pattern": "",
+ "presentable": true,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ },
+ {
+ "autogeneratePattern": "",
+ "hidden": false,
+ "id": "text3273110370",
+ "max": 0,
+ "min": 0,
+ "name": "sanitized_name",
+ "pattern": "",
+ "presentable": false,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ },
+ {
+ "autogeneratePattern": "",
+ "hidden": false,
+ "id": "text1997877400",
+ "max": 0,
+ "min": 0,
+ "name": "code",
+ "pattern": "",
+ "presentable": false,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ },
+ {
+ "hidden": false,
+ "id": "date3520360348",
+ "max": "",
+ "min": "",
+ "name": "released_at",
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "date"
+ },
+ {
+ "exceptDomains": null,
+ "hidden": false,
+ "id": "url659239397",
+ "name": "icon_uri",
+ "onlyDomains": null,
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "url"
+ },
+ {
+ "autogeneratePattern": "",
+ "hidden": false,
+ "id": "text2363381545",
+ "max": 0,
+ "min": 0,
+ "name": "type",
+ "pattern": "",
+ "presentable": true,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ }
+ ],
+ "indexes": [],
+ "system": false
+ }
+ ]`
+
+ return app.ImportCollectionsByMarshaledJSON([]byte(jsonData), false)
+ }, func(app core.App) error {
+ return nil
+ })
+}
diff --git a/backend/pb_migrations/1744049420_created_carte.js b/backend/pb_migrations/1744049420_created_carte.js
deleted file mode 100644
index d3110ed..0000000
--- a/backend/pb_migrations/1744049420_created_carte.js
+++ /dev/null
@@ -1,178 +0,0 @@
-///
-migrate((app) => {
- const collection = new Collection({
- "createRule": null,
- "deleteRule": null,
- "fields": [
- {
- "autogeneratePattern": "[a-z0-9]{15}",
- "hidden": false,
- "id": "text3208210256",
- "max": 15,
- "min": 15,
- "name": "id",
- "pattern": "^[a-z0-9]+$",
- "presentable": false,
- "primaryKey": true,
- "required": true,
- "system": true,
- "type": "text"
- },
- {
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text1579384326",
- "max": 0,
- "min": 0,
- "name": "name",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- },
- {
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text3273110370",
- "max": 0,
- "min": 0,
- "name": "sanitized_name",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- },
- {
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text3520360348",
- "max": 0,
- "min": 0,
- "name": "released_at",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- },
- {
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text976907234",
- "max": 0,
- "min": 0,
- "name": "layout",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- },
- {
- "exceptDomains": null,
- "hidden": false,
- "id": "url1456686396",
- "name": "small_image",
- "onlyDomains": null,
- "presentable": false,
- "required": false,
- "system": false,
- "type": "url"
- },
- {
- "exceptDomains": null,
- "hidden": false,
- "id": "url2615033119",
- "name": "small_image_back",
- "onlyDomains": null,
- "presentable": false,
- "required": false,
- "system": false,
- "type": "url"
- },
- {
- "exceptDomains": null,
- "hidden": false,
- "id": "url2291853061",
- "name": "normal_image",
- "onlyDomains": null,
- "presentable": false,
- "required": false,
- "system": false,
- "type": "url"
- },
- {
- "exceptDomains": null,
- "hidden": false,
- "id": "url2961008824",
- "name": "normal_image_back",
- "onlyDomains": null,
- "presentable": false,
- "required": false,
- "system": false,
- "type": "url"
- },
- {
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text2363381545",
- "max": 0,
- "min": 0,
- "name": "type",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- },
- {
- "hidden": false,
- "id": "select3054531206",
- "maxSelect": 2,
- "name": "color_identity",
- "presentable": false,
- "required": false,
- "system": false,
- "type": "select",
- "values": [
- "B",
- "W",
- "R",
- "G",
- "U"
- ]
- },
- {
- "hidden": false,
- "id": "autodate3332085495",
- "name": "updated",
- "onCreate": true,
- "onUpdate": true,
- "presentable": false,
- "system": false,
- "type": "autodate"
- }
- ],
- "id": "pbc_1905410326",
- "indexes": [],
- "listRule": null,
- "name": "carte",
- "system": false,
- "type": "base",
- "updateRule": null,
- "viewRule": null
- });
-
- return app.save(collection);
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_1905410326");
-
- return app.delete(collection);
-})
diff --git a/backend/pb_migrations/1744049617_created_set.js b/backend/pb_migrations/1744049617_created_set.js
deleted file mode 100644
index 580e7a4..0000000
--- a/backend/pb_migrations/1744049617_created_set.js
+++ /dev/null
@@ -1,101 +0,0 @@
-///
-migrate((app) => {
- const collection = new Collection({
- "createRule": null,
- "deleteRule": null,
- "fields": [
- {
- "autogeneratePattern": "[a-z0-9]{15}",
- "hidden": false,
- "id": "text3208210256",
- "max": 15,
- "min": 15,
- "name": "id",
- "pattern": "^[a-z0-9]+$",
- "presentable": false,
- "primaryKey": true,
- "required": true,
- "system": true,
- "type": "text"
- },
- {
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text1579384326",
- "max": 0,
- "min": 0,
- "name": "name",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- },
- {
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text3273110370",
- "max": 0,
- "min": 0,
- "name": "sanitized_name",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- },
- {
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text1997877400",
- "max": 0,
- "min": 0,
- "name": "code",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- },
- {
- "hidden": false,
- "id": "date3520360348",
- "max": "",
- "min": "",
- "name": "released_at",
- "presentable": false,
- "required": false,
- "system": false,
- "type": "date"
- },
- {
- "exceptDomains": null,
- "hidden": false,
- "id": "url659239397",
- "name": "icon_uri",
- "onlyDomains": null,
- "presentable": false,
- "required": false,
- "system": false,
- "type": "url"
- }
- ],
- "id": "pbc_3912384429",
- "indexes": [],
- "listRule": null,
- "name": "set",
- "system": false,
- "type": "base",
- "updateRule": null,
- "viewRule": null
- });
-
- return app.save(collection);
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_3912384429");
-
- return app.delete(collection);
-})
diff --git a/backend/pb_migrations/1744049690_created_brawlset.js b/backend/pb_migrations/1744049690_created_brawlset.js
deleted file mode 100644
index 12e99a9..0000000
--- a/backend/pb_migrations/1744049690_created_brawlset.js
+++ /dev/null
@@ -1,78 +0,0 @@
-///
-migrate((app) => {
- const collection = new Collection({
- "createRule": null,
- "deleteRule": null,
- "fields": [
- {
- "autogeneratePattern": "[a-z0-9]{15}",
- "hidden": false,
- "id": "text3208210256",
- "max": 15,
- "min": 15,
- "name": "id",
- "pattern": "^[a-z0-9]+$",
- "presentable": false,
- "primaryKey": true,
- "required": true,
- "system": true,
- "type": "text"
- },
- {
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text1579384326",
- "max": 0,
- "min": 0,
- "name": "name",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- },
- {
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text3273110370",
- "max": 0,
- "min": 0,
- "name": "sanitized_name",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- },
- {
- "cascadeDelete": false,
- "collectionId": "pbc_3912384429",
- "hidden": false,
- "id": "relation2492286417",
- "maxSelect": 999,
- "minSelect": 0,
- "name": "sets",
- "presentable": false,
- "required": false,
- "system": false,
- "type": "relation"
- }
- ],
- "id": "pbc_749385185",
- "indexes": [],
- "listRule": null,
- "name": "brawlset",
- "system": false,
- "type": "base",
- "updateRule": null,
- "viewRule": null
- });
-
- return app.save(collection);
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_749385185");
-
- return app.delete(collection);
-})
diff --git a/backend/pb_migrations/1744049710_updated_carte.js b/backend/pb_migrations/1744049710_updated_carte.js
deleted file mode 100644
index 6f97d9b..0000000
--- a/backend/pb_migrations/1744049710_updated_carte.js
+++ /dev/null
@@ -1,45 +0,0 @@
-///
-migrate((app) => {
- const collection = app.findCollectionByNameOrId("pbc_1905410326")
-
- // remove field
- collection.fields.removeById("text3520360348")
-
- // add field
- collection.fields.addAt(10, new Field({
- "hidden": false,
- "id": "date3520360348",
- "max": "",
- "min": "",
- "name": "released_at",
- "presentable": false,
- "required": false,
- "system": false,
- "type": "date"
- }))
-
- return app.save(collection)
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_1905410326")
-
- // add field
- collection.fields.addAt(3, new Field({
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text3520360348",
- "max": 0,
- "min": 0,
- "name": "released_at",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- }))
-
- // remove field
- collection.fields.removeById("date3520360348")
-
- return app.save(collection)
-})
diff --git a/backend/pb_migrations/1744049818_updated_carte.js b/backend/pb_migrations/1744049818_updated_carte.js
deleted file mode 100644
index d8c0169..0000000
--- a/backend/pb_migrations/1744049818_updated_carte.js
+++ /dev/null
@@ -1,94 +0,0 @@
-///
-migrate((app) => {
- const collection = app.findCollectionByNameOrId("pbc_1905410326")
-
- // add field
- collection.fields.addAt(11, new Field({
- "cascadeDelete": false,
- "collectionId": "pbc_3912384429",
- "hidden": false,
- "id": "relation3860080092",
- "maxSelect": 1,
- "minSelect": 0,
- "name": "set",
- "presentable": false,
- "required": false,
- "system": false,
- "type": "relation"
- }))
-
- // add field
- collection.fields.addAt(12, new Field({
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text3805467153",
- "max": 0,
- "min": 0,
- "name": "set_code",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- }))
-
- // add field
- collection.fields.addAt(13, new Field({
- "hidden": false,
- "id": "number3402113753",
- "max": null,
- "min": null,
- "name": "price",
- "onlyInt": false,
- "presentable": false,
- "required": false,
- "system": false,
- "type": "number"
- }))
-
- // add field
- collection.fields.addAt(14, new Field({
- "exceptDomains": null,
- "hidden": false,
- "id": "url518645060",
- "name": "cardmarket_url",
- "onlyDomains": null,
- "presentable": false,
- "required": false,
- "system": false,
- "type": "url"
- }))
-
- // add field
- collection.fields.addAt(15, new Field({
- "hidden": false,
- "id": "bool1734659578",
- "name": "can_be_commander",
- "presentable": false,
- "required": false,
- "system": false,
- "type": "bool"
- }))
-
- return app.save(collection)
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_1905410326")
-
- // remove field
- collection.fields.removeById("relation3860080092")
-
- // remove field
- collection.fields.removeById("text3805467153")
-
- // remove field
- collection.fields.removeById("number3402113753")
-
- // remove field
- collection.fields.removeById("url518645060")
-
- // remove field
- collection.fields.removeById("bool1734659578")
-
- return app.save(collection)
-})
diff --git a/backend/pb_migrations/1744049951_created_deck.js b/backend/pb_migrations/1744049951_created_deck.js
deleted file mode 100644
index 7853061..0000000
--- a/backend/pb_migrations/1744049951_created_deck.js
+++ /dev/null
@@ -1,140 +0,0 @@
-///
-migrate((app) => {
- const collection = new Collection({
- "createRule": null,
- "deleteRule": null,
- "fields": [
- {
- "autogeneratePattern": "[a-z0-9]{15}",
- "hidden": false,
- "id": "text3208210256",
- "max": 15,
- "min": 15,
- "name": "id",
- "pattern": "^[a-z0-9]+$",
- "presentable": false,
- "primaryKey": true,
- "required": true,
- "system": true,
- "type": "text"
- },
- {
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text1579384326",
- "max": 0,
- "min": 0,
- "name": "name",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- },
- {
- "hidden": false,
- "id": "select3054531206",
- "maxSelect": 2,
- "name": "color_identity",
- "presentable": false,
- "required": false,
- "system": false,
- "type": "select",
- "values": [
- "B",
- "R",
- "G",
- "U",
- "W"
- ]
- },
- {
- "cascadeDelete": false,
- "collectionId": "_pb_users_auth_",
- "hidden": false,
- "id": "relation3479234172",
- "maxSelect": 1,
- "minSelect": 0,
- "name": "owner",
- "presentable": false,
- "required": false,
- "system": false,
- "type": "relation"
- },
- {
- "cascadeDelete": false,
- "collectionId": "pbc_1905410326",
- "hidden": false,
- "id": "relation3635975509",
- "maxSelect": 999,
- "minSelect": 0,
- "name": "cartes",
- "presentable": false,
- "required": false,
- "system": false,
- "type": "relation"
- },
- {
- "cascadeDelete": false,
- "collectionId": "pbc_1905410326",
- "hidden": false,
- "id": "relation1121130682",
- "maxSelect": 1,
- "minSelect": 0,
- "name": "commander",
- "presentable": false,
- "required": false,
- "system": false,
- "type": "relation"
- },
- {
- "cascadeDelete": false,
- "collectionId": "pbc_749385185",
- "hidden": false,
- "id": "relation1826942456",
- "maxSelect": 1,
- "minSelect": 0,
- "name": "brawlset",
- "presentable": false,
- "required": false,
- "system": false,
- "type": "relation"
- },
- {
- "hidden": false,
- "id": "autodate2990389176",
- "name": "created",
- "onCreate": true,
- "onUpdate": false,
- "presentable": false,
- "system": false,
- "type": "autodate"
- },
- {
- "hidden": false,
- "id": "autodate3332085495",
- "name": "updated",
- "onCreate": true,
- "onUpdate": true,
- "presentable": false,
- "system": false,
- "type": "autodate"
- }
- ],
- "id": "pbc_1755402631",
- "indexes": [],
- "listRule": null,
- "name": "deck",
- "system": false,
- "type": "base",
- "updateRule": null,
- "viewRule": null
- });
-
- return app.save(collection);
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_1755402631");
-
- return app.delete(collection);
-})
diff --git a/backend/pb_migrations/1744049967_updated_brawlset.js b/backend/pb_migrations/1744049967_updated_brawlset.js
deleted file mode 100644
index 096040b..0000000
--- a/backend/pb_migrations/1744049967_updated_brawlset.js
+++ /dev/null
@@ -1,42 +0,0 @@
-///
-migrate((app) => {
- const collection = app.findCollectionByNameOrId("pbc_749385185")
-
- // update field
- collection.fields.addAt(1, new Field({
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text1579384326",
- "max": 0,
- "min": 0,
- "name": "name",
- "pattern": "",
- "presentable": true,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- }))
-
- return app.save(collection)
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_749385185")
-
- // update field
- collection.fields.addAt(1, new Field({
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text1579384326",
- "max": 0,
- "min": 0,
- "name": "name",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- }))
-
- return app.save(collection)
-})
diff --git a/backend/pb_migrations/1744049979_updated_carte.js b/backend/pb_migrations/1744049979_updated_carte.js
deleted file mode 100644
index 802abed..0000000
--- a/backend/pb_migrations/1744049979_updated_carte.js
+++ /dev/null
@@ -1,74 +0,0 @@
-///
-migrate((app) => {
- const collection = app.findCollectionByNameOrId("pbc_1905410326")
-
- // update field
- collection.fields.addAt(1, new Field({
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text1579384326",
- "max": 0,
- "min": 0,
- "name": "name",
- "pattern": "",
- "presentable": true,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- }))
-
- // update field
- collection.fields.addAt(12, new Field({
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text3805467153",
- "max": 0,
- "min": 0,
- "name": "set_code",
- "pattern": "",
- "presentable": true,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- }))
-
- return app.save(collection)
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_1905410326")
-
- // update field
- collection.fields.addAt(1, new Field({
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text1579384326",
- "max": 0,
- "min": 0,
- "name": "name",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- }))
-
- // update field
- collection.fields.addAt(12, new Field({
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text3805467153",
- "max": 0,
- "min": 0,
- "name": "set_code",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- }))
-
- return app.save(collection)
-})
diff --git a/backend/pb_migrations/1744049986_updated_deck.js b/backend/pb_migrations/1744049986_updated_deck.js
deleted file mode 100644
index f6fc4d2..0000000
--- a/backend/pb_migrations/1744049986_updated_deck.js
+++ /dev/null
@@ -1,42 +0,0 @@
-///
-migrate((app) => {
- const collection = app.findCollectionByNameOrId("pbc_1755402631")
-
- // update field
- collection.fields.addAt(1, new Field({
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text1579384326",
- "max": 0,
- "min": 0,
- "name": "name",
- "pattern": "",
- "presentable": true,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- }))
-
- return app.save(collection)
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_1755402631")
-
- // update field
- collection.fields.addAt(1, new Field({
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text1579384326",
- "max": 0,
- "min": 0,
- "name": "name",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- }))
-
- return app.save(collection)
-})
diff --git a/backend/pb_migrations/1744049999_updated_set.js b/backend/pb_migrations/1744049999_updated_set.js
deleted file mode 100644
index 4d94331..0000000
--- a/backend/pb_migrations/1744049999_updated_set.js
+++ /dev/null
@@ -1,42 +0,0 @@
-///
-migrate((app) => {
- const collection = app.findCollectionByNameOrId("pbc_3912384429")
-
- // update field
- collection.fields.addAt(1, new Field({
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text1579384326",
- "max": 0,
- "min": 0,
- "name": "name",
- "pattern": "",
- "presentable": true,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- }))
-
- return app.save(collection)
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_3912384429")
-
- // update field
- collection.fields.addAt(1, new Field({
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text1579384326",
- "max": 0,
- "min": 0,
- "name": "name",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- }))
-
- return app.save(collection)
-})
diff --git a/backend/pb_migrations/1744051259_updated_set.js b/backend/pb_migrations/1744051259_updated_set.js
deleted file mode 100644
index a1ce986..0000000
--- a/backend/pb_migrations/1744051259_updated_set.js
+++ /dev/null
@@ -1,28 +0,0 @@
-///
-migrate((app) => {
- const collection = app.findCollectionByNameOrId("pbc_3912384429")
-
- // update collection data
- unmarshal({
- "createRule": "",
- "deleteRule": "",
- "listRule": "",
- "updateRule": "",
- "viewRule": ""
- }, collection)
-
- return app.save(collection)
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_3912384429")
-
- // update collection data
- unmarshal({
- "createRule": null,
- "deleteRule": null,
- "listRule": null,
- "updateRule": null,
- "viewRule": null
- }, collection)
-
- return app.save(collection)
-})
diff --git a/backend/pb_migrations/1744119600_updated_set.js b/backend/pb_migrations/1744119600_updated_set.js
deleted file mode 100644
index ba13554..0000000
--- a/backend/pb_migrations/1744119600_updated_set.js
+++ /dev/null
@@ -1,20 +0,0 @@
-///
-migrate((app) => {
- const collection = app.findCollectionByNameOrId("pbc_3912384429")
-
- // update collection data
- unmarshal({
- "name": "mtg_set"
- }, collection)
-
- return app.save(collection)
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_3912384429")
-
- // update collection data
- unmarshal({
- "name": "set"
- }, collection)
-
- return app.save(collection)
-})
diff --git a/backend/pb_migrations/1744119800_updated_deck.js b/backend/pb_migrations/1744119800_updated_deck.js
deleted file mode 100644
index b1ef7c4..0000000
--- a/backend/pb_migrations/1744119800_updated_deck.js
+++ /dev/null
@@ -1,42 +0,0 @@
-///
-migrate((app) => {
- const collection = app.findCollectionByNameOrId("pbc_1755402631")
-
- // update field
- collection.fields.addAt(0, new Field({
- "autogeneratePattern": "[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}",
- "hidden": false,
- "id": "text3208210256",
- "max": 36,
- "min": 36,
- "name": "id",
- "pattern": "^[a-z0-9\\-]+$",
- "presentable": false,
- "primaryKey": true,
- "required": true,
- "system": true,
- "type": "text"
- }))
-
- return app.save(collection)
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_1755402631")
-
- // update field
- collection.fields.addAt(0, new Field({
- "autogeneratePattern": "[a-z0-9]{15}",
- "hidden": false,
- "id": "text3208210256",
- "max": 15,
- "min": 15,
- "name": "id",
- "pattern": "^[a-z0-9]+$",
- "presentable": false,
- "primaryKey": true,
- "required": true,
- "system": true,
- "type": "text"
- }))
-
- return app.save(collection)
-})
diff --git a/backend/pb_migrations/1744119839_updated_mtg_set.js b/backend/pb_migrations/1744119839_updated_mtg_set.js
deleted file mode 100644
index cb3ec70..0000000
--- a/backend/pb_migrations/1744119839_updated_mtg_set.js
+++ /dev/null
@@ -1,42 +0,0 @@
-///
-migrate((app) => {
- const collection = app.findCollectionByNameOrId("pbc_3912384429")
-
- // update field
- collection.fields.addAt(0, new Field({
- "autogeneratePattern": "[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}",
- "hidden": false,
- "id": "text3208210256",
- "max": 36,
- "min": 36,
- "name": "id",
- "pattern": "^[a-z0-9\\-]+$",
- "presentable": false,
- "primaryKey": true,
- "required": true,
- "system": true,
- "type": "text"
- }))
-
- return app.save(collection)
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_3912384429")
-
- // update field
- collection.fields.addAt(0, new Field({
- "autogeneratePattern": "[a-z0-9]{15}",
- "hidden": false,
- "id": "text3208210256",
- "max": 15,
- "min": 15,
- "name": "id",
- "pattern": "^[a-z0-9]+$",
- "presentable": false,
- "primaryKey": true,
- "required": true,
- "system": true,
- "type": "text"
- }))
-
- return app.save(collection)
-})
diff --git a/backend/pb_migrations/1744125643_updated_mtg_set.js b/backend/pb_migrations/1744125643_updated_mtg_set.js
deleted file mode 100644
index fd0c5a8..0000000
--- a/backend/pb_migrations/1744125643_updated_mtg_set.js
+++ /dev/null
@@ -1,29 +0,0 @@
-///
-migrate((app) => {
- const collection = app.findCollectionByNameOrId("pbc_3912384429")
-
- // add field
- collection.fields.addAt(6, new Field({
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text2363381545",
- "max": 0,
- "min": 0,
- "name": "type",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- }))
-
- return app.save(collection)
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_3912384429")
-
- // remove field
- collection.fields.removeById("text2363381545")
-
- return app.save(collection)
-})
diff --git a/backend/pb_migrations/1744126008_updated_mtg_set.js b/backend/pb_migrations/1744126008_updated_mtg_set.js
deleted file mode 100644
index 2c1b0a2..0000000
--- a/backend/pb_migrations/1744126008_updated_mtg_set.js
+++ /dev/null
@@ -1,42 +0,0 @@
-///
-migrate((app) => {
- const collection = app.findCollectionByNameOrId("pbc_3912384429")
-
- // update field
- collection.fields.addAt(6, new Field({
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text2363381545",
- "max": 0,
- "min": 0,
- "name": "type",
- "pattern": "",
- "presentable": true,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- }))
-
- return app.save(collection)
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_3912384429")
-
- // update field
- collection.fields.addAt(6, new Field({
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text2363381545",
- "max": 0,
- "min": 0,
- "name": "type",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- }))
-
- return app.save(collection)
-})
diff --git a/backend/pb_migrations/1744128064_created_posts.js b/backend/pb_migrations/1744128064_created_posts.js
deleted file mode 100644
index 2b86b25..0000000
--- a/backend/pb_migrations/1744128064_created_posts.js
+++ /dev/null
@@ -1,95 +0,0 @@
-///
-migrate((app) => {
- const collection = new Collection({
- "createRule": null,
- "deleteRule": null,
- "fields": [
- {
- "autogeneratePattern": "[a-z0-9]{15}",
- "hidden": false,
- "id": "text3208210256",
- "max": 15,
- "min": 15,
- "name": "id",
- "pattern": "^[a-z0-9]+$",
- "presentable": false,
- "primaryKey": true,
- "required": true,
- "system": true,
- "type": "text"
- },
- {
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text724990059",
- "max": 0,
- "min": 0,
- "name": "title",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- },
- {
- "cascadeDelete": false,
- "collectionId": "_pb_users_auth_",
- "hidden": false,
- "id": "relation3182418120",
- "maxSelect": 1,
- "minSelect": 0,
- "name": "author",
- "presentable": false,
- "required": false,
- "system": false,
- "type": "relation"
- },
- {
- "convertURLs": false,
- "hidden": false,
- "id": "editor37359206",
- "maxSize": 0,
- "name": "article",
- "presentable": false,
- "required": false,
- "system": false,
- "type": "editor"
- },
- {
- "hidden": false,
- "id": "autodate2990389176",
- "name": "created",
- "onCreate": true,
- "onUpdate": false,
- "presentable": false,
- "system": false,
- "type": "autodate"
- },
- {
- "hidden": false,
- "id": "autodate3332085495",
- "name": "updated",
- "onCreate": true,
- "onUpdate": true,
- "presentable": false,
- "system": false,
- "type": "autodate"
- }
- ],
- "id": "pbc_1125843985",
- "indexes": [],
- "listRule": null,
- "name": "posts",
- "system": false,
- "type": "base",
- "updateRule": null,
- "viewRule": null
- });
-
- return app.save(collection);
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_1125843985");
-
- return app.delete(collection);
-})
diff --git a/backend/pb_migrations/1744128183_deleted_posts.js b/backend/pb_migrations/1744128183_deleted_posts.js
deleted file mode 100644
index f19668f..0000000
--- a/backend/pb_migrations/1744128183_deleted_posts.js
+++ /dev/null
@@ -1,95 +0,0 @@
-///
-migrate((app) => {
- const collection = app.findCollectionByNameOrId("pbc_1125843985");
-
- return app.delete(collection);
-}, (app) => {
- const collection = new Collection({
- "createRule": null,
- "deleteRule": null,
- "fields": [
- {
- "autogeneratePattern": "[a-z0-9]{15}",
- "hidden": false,
- "id": "text3208210256",
- "max": 15,
- "min": 15,
- "name": "id",
- "pattern": "^[a-z0-9]+$",
- "presentable": false,
- "primaryKey": true,
- "required": true,
- "system": true,
- "type": "text"
- },
- {
- "autogeneratePattern": "",
- "hidden": false,
- "id": "text724990059",
- "max": 0,
- "min": 0,
- "name": "title",
- "pattern": "",
- "presentable": false,
- "primaryKey": false,
- "required": false,
- "system": false,
- "type": "text"
- },
- {
- "cascadeDelete": false,
- "collectionId": "_pb_users_auth_",
- "hidden": false,
- "id": "relation3182418120",
- "maxSelect": 1,
- "minSelect": 0,
- "name": "author",
- "presentable": false,
- "required": false,
- "system": false,
- "type": "relation"
- },
- {
- "convertURLs": false,
- "hidden": false,
- "id": "editor37359206",
- "maxSize": 0,
- "name": "article",
- "presentable": false,
- "required": false,
- "system": false,
- "type": "editor"
- },
- {
- "hidden": false,
- "id": "autodate2990389176",
- "name": "created",
- "onCreate": true,
- "onUpdate": false,
- "presentable": false,
- "system": false,
- "type": "autodate"
- },
- {
- "hidden": false,
- "id": "autodate3332085495",
- "name": "updated",
- "onCreate": true,
- "onUpdate": true,
- "presentable": false,
- "system": false,
- "type": "autodate"
- }
- ],
- "id": "pbc_1125843985",
- "indexes": [],
- "listRule": null,
- "name": "posts",
- "system": false,
- "type": "base",
- "updateRule": null,
- "viewRule": null
- });
-
- return app.save(collection);
-})
diff --git a/backend/pb_migrations/1744133653_updated_carte.js b/backend/pb_migrations/1744133653_updated_carte.js
deleted file mode 100644
index 438b518..0000000
--- a/backend/pb_migrations/1744133653_updated_carte.js
+++ /dev/null
@@ -1,42 +0,0 @@
-///
-migrate((app) => {
- const collection = app.findCollectionByNameOrId("pbc_1905410326")
-
- // update field
- collection.fields.addAt(0, new Field({
- "autogeneratePattern": "[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}",
- "hidden": false,
- "id": "text3208210256",
- "max": 36,
- "min": 36,
- "name": "id",
- "pattern": "^[a-z0-9\\-]+$",
- "presentable": false,
- "primaryKey": true,
- "required": true,
- "system": true,
- "type": "text"
- }))
-
- return app.save(collection)
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_1905410326")
-
- // update field
- collection.fields.addAt(0, new Field({
- "autogeneratePattern": "[a-z0-9]{15}",
- "hidden": false,
- "id": "text3208210256",
- "max": 15,
- "min": 15,
- "name": "id",
- "pattern": "^[a-z0-9]+$",
- "presentable": false,
- "primaryKey": true,
- "required": true,
- "system": true,
- "type": "text"
- }))
-
- return app.save(collection)
-})
diff --git a/backend/pb_migrations/1744140479_updated_carte.js b/backend/pb_migrations/1744140479_updated_carte.js
deleted file mode 100644
index da5006d..0000000
--- a/backend/pb_migrations/1744140479_updated_carte.js
+++ /dev/null
@@ -1,40 +0,0 @@
-///
-migrate((app) => {
- const collection = app.findCollectionByNameOrId("pbc_1905410326")
-
- // update field
- collection.fields.addAt(11, new Field({
- "cascadeDelete": false,
- "collectionId": "pbc_3912384429",
- "hidden": false,
- "id": "relation3860080092",
- "maxSelect": 1,
- "minSelect": 0,
- "name": "mtg_set",
- "presentable": false,
- "required": false,
- "system": false,
- "type": "relation"
- }))
-
- return app.save(collection)
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_1905410326")
-
- // update field
- collection.fields.addAt(11, new Field({
- "cascadeDelete": false,
- "collectionId": "pbc_3912384429",
- "hidden": false,
- "id": "relation3860080092",
- "maxSelect": 1,
- "minSelect": 0,
- "name": "set",
- "presentable": false,
- "required": false,
- "system": false,
- "type": "relation"
- }))
-
- return app.save(collection)
-})
diff --git a/backend/pb_migrations/1744149166_updated_carte.js b/backend/pb_migrations/1744149166_updated_carte.js
deleted file mode 100644
index e2fbb72..0000000
--- a/backend/pb_migrations/1744149166_updated_carte.js
+++ /dev/null
@@ -1,25 +0,0 @@
-///
-migrate((app) => {
- const collection = app.findCollectionByNameOrId("pbc_1905410326")
-
- // remove field
- collection.fields.removeById("autodate3332085495")
-
- return app.save(collection)
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_1905410326")
-
- // add field
- collection.fields.addAt(16, new Field({
- "hidden": false,
- "id": "autodate3332085495",
- "name": "updated",
- "onCreate": true,
- "onUpdate": true,
- "presentable": false,
- "system": false,
- "type": "autodate"
- }))
-
- return app.save(collection)
-})
diff --git a/backend/pb_migrations/1744150791_updated_deck.js b/backend/pb_migrations/1744150791_updated_deck.js
deleted file mode 100644
index 598e353..0000000
--- a/backend/pb_migrations/1744150791_updated_deck.js
+++ /dev/null
@@ -1,28 +0,0 @@
-///
-migrate((app) => {
- const collection = app.findCollectionByNameOrId("pbc_1755402631")
-
- // update collection data
- unmarshal({
- "createRule": "@request.auth.id != \"\"",
- "deleteRule": "owner ?= @request.auth.id",
- "listRule": "owner ?= @request.auth.id",
- "updateRule": "owner ?= @request.auth.id",
- "viewRule": "owner ?= @request.auth.id"
- }, collection)
-
- return app.save(collection)
-}, (app) => {
- const collection = app.findCollectionByNameOrId("pbc_1755402631")
-
- // update collection data
- unmarshal({
- "createRule": null,
- "deleteRule": null,
- "listRule": null,
- "updateRule": null,
- "viewRule": null
- }, collection)
-
- return app.save(collection)
-})