diff --git a/server/.pocketbase b/server/.pocketbase deleted file mode 100644 index bcb8312e..00000000 --- a/server/.pocketbase +++ /dev/null @@ -1 +0,0 @@ -version=0.12.1 \ No newline at end of file diff --git a/server/pb_migrations/1675256468_created_tracks.js b/server/pb_migrations/1675256468_created_tracks.js deleted file mode 100644 index 46d03fbb..00000000 --- a/server/pb_migrations/1675256468_created_tracks.js +++ /dev/null @@ -1,63 +0,0 @@ -migrate((db) => { - const collection = new Collection({ - "id": "pevn93oxbnovw0s", - "created": "2023-02-01 13:01:08.893Z", - "updated": "2023-02-01 13:01:08.893Z", - "name": "tracks", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "ycnix0ai", - "name": "spotify_id", - "type": "text", - "required": true, - "unique": false, - "options": { - "min": 20, - "max": 22, - "pattern": "" - } - }, - { - "system": false, - "id": "ih8fxzgh", - "name": "youtube_id", - "type": "text", - "required": true, - "unique": false, - "options": { - "min": 10, - "max": 11, - "pattern": "" - } - }, - { - "system": false, - "id": "vzvqgsjf", - "name": "votes", - "type": "number", - "required": true, - "unique": false, - "options": { - "min": null, - "max": null - } - } - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }); - - return Dao(db).saveCollection(collection); -}, (db) => { - const dao = new Dao(db); - const collection = dao.findCollectionByNameOrId("pevn93oxbnovw0s"); - - return dao.deleteCollection(collection); -}) diff --git a/server/pb_migrations/1675256557_updated_tracks.js b/server/pb_migrations/1675256557_updated_tracks.js deleted file mode 100644 index cdcf19bc..00000000 --- a/server/pb_migrations/1675256557_updated_tracks.js +++ /dev/null @@ -1,17 +0,0 @@ -migrate((db) => { - const dao = new Dao(db) - const collection = dao.findCollectionByNameOrId("pevn93oxbnovw0s") - - collection.listRule = "" - collection.viewRule = "" - - return dao.saveCollection(collection) -}, (db) => { - const dao = new Dao(db) - const collection = dao.findCollectionByNameOrId("pevn93oxbnovw0s") - - collection.listRule = null - collection.viewRule = null - - return dao.saveCollection(collection) -}) diff --git a/server/pb_migrations/1675256593_updated_users.js b/server/pb_migrations/1675256593_updated_users.js deleted file mode 100644 index 5643c3a0..00000000 --- a/server/pb_migrations/1675256593_updated_users.js +++ /dev/null @@ -1,19 +0,0 @@ -migrate((db) => { - const dao = new Dao(db) - const collection = dao.findCollectionByNameOrId("_pb_users_auth_") - - collection.createRule = null - collection.updateRule = null - collection.deleteRule = null - - return dao.saveCollection(collection) -}, (db) => { - const dao = new Dao(db) - const collection = dao.findCollectionByNameOrId("_pb_users_auth_") - - collection.createRule = "" - collection.updateRule = "id = @request.auth.id" - collection.deleteRule = "id = @request.auth.id" - - return dao.saveCollection(collection) -}) diff --git a/server/pb_migrations/1675256678_updated_tracks.js b/server/pb_migrations/1675256678_updated_tracks.js deleted file mode 100644 index 4b472ad1..00000000 --- a/server/pb_migrations/1675256678_updated_tracks.js +++ /dev/null @@ -1,17 +0,0 @@ -migrate((db) => { - const dao = new Dao(db) - const collection = dao.findCollectionByNameOrId("pevn93oxbnovw0s") - - collection.createRule = "@request.auth.id != ''" - collection.updateRule = "@request.auth.id != ''" - - return dao.saveCollection(collection) -}, (db) => { - const dao = new Dao(db) - const collection = dao.findCollectionByNameOrId("pevn93oxbnovw0s") - - collection.createRule = null - collection.updateRule = null - - return dao.saveCollection(collection) -}) diff --git a/server/pb_migrations/1675257121_updated_tracks.js b/server/pb_migrations/1675257121_updated_tracks.js deleted file mode 100644 index a1b7604f..00000000 --- a/server/pb_migrations/1675257121_updated_tracks.js +++ /dev/null @@ -1,17 +0,0 @@ -migrate((db) => { - const dao = new Dao(db) - const collection = dao.findCollectionByNameOrId("pevn93oxbnovw0s") - - collection.createRule = "@request.auth.id != '' && ((spotify_id ?= @collection.tracks.spotify_id && youtube_id ?= @collection.tracks.youtube_id) || (spotify_id ?!= @collection.tracks.spotify_id && youtube_id ?!= @collection.tracks.youtube_id))" - collection.updateRule = "@request.auth.id != '' && ((spotify_id ?= @collection.tracks.spotify_id && youtube_id ?= @collection.tracks.youtube_id) || (spotify_id ?!= @collection.tracks.spotify_id && youtube_id ?!= @collection.tracks.youtube_id))" - - return dao.saveCollection(collection) -}, (db) => { - const dao = new Dao(db) - const collection = dao.findCollectionByNameOrId("pevn93oxbnovw0s") - - collection.createRule = null - collection.updateRule = null - - return dao.saveCollection(collection) -}) diff --git a/server/pb_migrations/1675257148_updated_tracks.js b/server/pb_migrations/1675257148_updated_tracks.js deleted file mode 100644 index 544d0e85..00000000 --- a/server/pb_migrations/1675257148_updated_tracks.js +++ /dev/null @@ -1,39 +0,0 @@ -migrate((db) => { - const dao = new Dao(db) - const collection = dao.findCollectionByNameOrId("pevn93oxbnovw0s") - - // update - collection.schema.addField(new SchemaField({ - "system": false, - "id": "vzvqgsjf", - "name": "votes", - "type": "number", - "required": false, - "unique": false, - "options": { - "min": null, - "max": null - } - })) - - return dao.saveCollection(collection) -}, (db) => { - const dao = new Dao(db) - const collection = dao.findCollectionByNameOrId("pevn93oxbnovw0s") - - // update - collection.schema.addField(new SchemaField({ - "system": false, - "id": "vzvqgsjf", - "name": "votes", - "type": "number", - "required": true, - "unique": false, - "options": { - "min": null, - "max": null - } - })) - - return dao.saveCollection(collection) -})