mothership db updates

This commit is contained in:
Ben Allfree 2024-10-13 03:36:20 +00:00
parent 1a44f9f560
commit 48b84bbc6a
7 changed files with 909 additions and 0 deletions

View File

@ -0,0 +1,125 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("4jyrkxcora6bl8r")
// remove
collection.schema.removeField("sswzvthl")
// remove
collection.schema.removeField("uwk4xc29")
// remove
collection.schema.removeField("zib1fz8s")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "8jht2ome",
"name": "email",
"type": "email",
"required": false,
"presentable": false,
"unique": false,
"options": {
"exceptDomains": null,
"onlyDomains": null
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "8whql8c9",
"name": "isFounder",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "fftixxya",
"name": "subscription",
"type": "select",
"required": true,
"presentable": false,
"unique": false,
"options": {
"maxSelect": 1,
"values": [
"free",
"premium",
"lifetime",
"founder",
"legacy"
]
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("4jyrkxcora6bl8r")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "sswzvthl",
"name": "email",
"type": "email",
"required": false,
"presentable": false,
"unique": false,
"options": {
"exceptDomains": null,
"onlyDomains": null
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "uwk4xc29",
"name": "isFounder",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "zib1fz8s",
"name": "subscription",
"type": "select",
"required": true,
"presentable": false,
"unique": false,
"options": {
"maxSelect": 1,
"values": [
"free",
"premium",
"lifetime",
"legacy"
]
}
}))
// remove
collection.schema.removeField("8jht2ome")
// remove
collection.schema.removeField("8whql8c9")
// remove
collection.schema.removeField("fftixxya")
return dao.saveCollection(collection)
})

View File

@ -0,0 +1,193 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("s00x84jumfjcuvc")
// remove
collection.schema.removeField("zxevivcb")
// remove
collection.schema.removeField("mnrvzbur")
// remove
collection.schema.removeField("vbsbhwar")
// remove
collection.schema.removeField("juoocwz5")
// remove
collection.schema.removeField("kjvjizen")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "1l3mn4p5",
"name": "username",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "8uo8rsrr",
"name": "email",
"type": "email",
"required": false,
"presentable": false,
"unique": false,
"options": {
"exceptDomains": null,
"onlyDomains": null
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "54tyrksg",
"name": "subscription",
"type": "select",
"required": true,
"presentable": false,
"unique": false,
"options": {
"maxSelect": 1,
"values": [
"free",
"premium",
"lifetime",
"founder",
"legacy"
]
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "9bvqwzmu",
"name": "isLegacy",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "5ftrlbfn",
"name": "isFounder",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("s00x84jumfjcuvc")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "zxevivcb",
"name": "username",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "mnrvzbur",
"name": "email",
"type": "email",
"required": false,
"presentable": false,
"unique": false,
"options": {
"exceptDomains": null,
"onlyDomains": null
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "vbsbhwar",
"name": "subscription",
"type": "select",
"required": true,
"presentable": false,
"unique": false,
"options": {
"maxSelect": 1,
"values": [
"free",
"premium",
"lifetime",
"legacy"
]
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "juoocwz5",
"name": "isLegacy",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "kjvjizen",
"name": "isFounder",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))
// remove
collection.schema.removeField("1l3mn4p5")
// remove
collection.schema.removeField("8uo8rsrr")
// remove
collection.schema.removeField("54tyrksg")
// remove
collection.schema.removeField("9bvqwzmu")
// remove
collection.schema.removeField("5ftrlbfn")
return dao.saveCollection(collection)
})

View File

@ -0,0 +1,193 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("ledwhu6imoityio")
// remove
collection.schema.removeField("xjrgrtjv")
// remove
collection.schema.removeField("77iental")
// remove
collection.schema.removeField("cxidejr6")
// remove
collection.schema.removeField("gwvvuf73")
// remove
collection.schema.removeField("qy2hfxsx")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "u3xw295j",
"name": "username",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "zmruwma6",
"name": "email",
"type": "email",
"required": false,
"presentable": false,
"unique": false,
"options": {
"exceptDomains": null,
"onlyDomains": null
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "ltqqpcrf",
"name": "subscription",
"type": "select",
"required": true,
"presentable": false,
"unique": false,
"options": {
"maxSelect": 1,
"values": [
"free",
"premium",
"lifetime",
"founder",
"legacy"
]
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "jsdivvyf",
"name": "isLegacy",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "pssisw8g",
"name": "isFounder",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("ledwhu6imoityio")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "xjrgrtjv",
"name": "username",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "77iental",
"name": "email",
"type": "email",
"required": false,
"presentable": false,
"unique": false,
"options": {
"exceptDomains": null,
"onlyDomains": null
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "cxidejr6",
"name": "subscription",
"type": "select",
"required": true,
"presentable": false,
"unique": false,
"options": {
"maxSelect": 1,
"values": [
"free",
"premium",
"lifetime",
"legacy"
]
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "gwvvuf73",
"name": "isLegacy",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "qy2hfxsx",
"name": "isFounder",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))
// remove
collection.schema.removeField("u3xw295j")
// remove
collection.schema.removeField("zmruwma6")
// remove
collection.schema.removeField("ltqqpcrf")
// remove
collection.schema.removeField("jsdivvyf")
// remove
collection.schema.removeField("pssisw8g")
return dao.saveCollection(collection)
})

View File

@ -0,0 +1,53 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("systemprofiles0")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "7jf2i4be",
"name": "subscription",
"type": "select",
"required": true,
"presentable": false,
"unique": false,
"options": {
"maxSelect": 1,
"values": [
"free",
"premium",
"lifetime",
"founder",
"legacy"
]
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("systemprofiles0")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "7jf2i4be",
"name": "subscription",
"type": "select",
"required": true,
"presentable": false,
"unique": false,
"options": {
"maxSelect": 1,
"values": [
"free",
"premium",
"lifetime",
"legacy"
]
}
}))
return dao.saveCollection(collection)
})

View File

@ -0,0 +1,261 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("4kshuv7r3jdrst4")
// remove
collection.schema.removeField("j4oyvsxw")
// remove
collection.schema.removeField("rz3ufbgh")
// remove
collection.schema.removeField("0cawpmvr")
// remove
collection.schema.removeField("alj2bzt5")
// remove
collection.schema.removeField("ipcbnqvm")
// remove
collection.schema.removeField("qhhovz76")
// remove
collection.schema.removeField("qwrt00fr")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "adw77j4s",
"name": "username",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "wxps0qm4",
"name": "email",
"type": "email",
"required": false,
"presentable": false,
"unique": false,
"options": {
"exceptDomains": null,
"onlyDomains": null
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "cxtdf1is",
"name": "subscription",
"type": "select",
"required": true,
"presentable": false,
"unique": false,
"options": {
"maxSelect": 1,
"values": [
"free",
"premium",
"lifetime",
"founder",
"legacy"
]
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "opzsczua",
"name": "isLegacy",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "noac3js4",
"name": "isFounder",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "zexzaoc9",
"name": "tokenKey",
"type": "json",
"required": false,
"presentable": false,
"unique": false,
"options": {
"maxSize": 1
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "1ggewfpm",
"name": "passwordHash",
"type": "json",
"required": false,
"presentable": false,
"unique": false,
"options": {
"maxSize": 1
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("4kshuv7r3jdrst4")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "j4oyvsxw",
"name": "username",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "rz3ufbgh",
"name": "email",
"type": "email",
"required": false,
"presentable": false,
"unique": false,
"options": {
"exceptDomains": null,
"onlyDomains": null
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "0cawpmvr",
"name": "subscription",
"type": "select",
"required": true,
"presentable": false,
"unique": false,
"options": {
"maxSelect": 1,
"values": [
"free",
"premium",
"lifetime",
"legacy"
]
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "alj2bzt5",
"name": "isLegacy",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "ipcbnqvm",
"name": "isFounder",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "qhhovz76",
"name": "tokenKey",
"type": "json",
"required": false,
"presentable": false,
"unique": false,
"options": {
"maxSize": 1
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "qwrt00fr",
"name": "passwordHash",
"type": "json",
"required": false,
"presentable": false,
"unique": false,
"options": {
"maxSize": 1
}
}))
// remove
collection.schema.removeField("adw77j4s")
// remove
collection.schema.removeField("wxps0qm4")
// remove
collection.schema.removeField("cxtdf1is")
// remove
collection.schema.removeField("opzsczua")
// remove
collection.schema.removeField("noac3js4")
// remove
collection.schema.removeField("zexzaoc9")
// remove
collection.schema.removeField("1ggewfpm")
return dao.saveCollection(collection)
})

View File

@ -0,0 +1,34 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("systemprofiles0")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "8i4kdjgr",
"name": "subscription_interval",
"type": "select",
"required": false,
"presentable": false,
"unique": false,
"options": {
"maxSelect": 1,
"values": [
"monthly",
"annually",
"lifetime"
]
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("systemprofiles0")
// remove
collection.schema.removeField("8i4kdjgr")
return dao.saveCollection(collection)
})

View File

@ -0,0 +1,50 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("systemprofiles0")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "8i4kdjgr",
"name": "subscription_interval",
"type": "select",
"required": false,
"presentable": false,
"unique": false,
"options": {
"maxSelect": 1,
"values": [
"month",
"year",
"life"
]
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("systemprofiles0")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "8i4kdjgr",
"name": "subscription_interval",
"type": "select",
"required": false,
"presentable": false,
"unique": false,
"options": {
"maxSelect": 1,
"values": [
"monthly",
"annually",
"lifetime"
]
}
}))
return dao.saveCollection(collection)
})