-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
1,023 additions
and
37 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -19,3 +19,9 @@ Thumbs.db | |
# Vite | ||
vite.config.js.timestamp-* | ||
vite.config.ts.timestamp-* | ||
|
||
# Intellij | ||
.idea | ||
|
||
# PocketBase | ||
/pb_data |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/// <reference path="../pb_data/types.d.ts" /> | ||
migrate( | ||
(db) => { | ||
const collection = new Collection({ | ||
id: 'etdl54k56vwybrn', | ||
created: '2024-06-19 21:57:13.774Z', | ||
updated: '2024-06-19 21:57:13.774Z', | ||
name: 'profiles', | ||
type: 'base', | ||
system: false, | ||
schema: [ | ||
{ | ||
system: false, | ||
id: 'vodgbchi', | ||
name: 'user', | ||
type: 'relation', | ||
required: true, | ||
presentable: false, | ||
unique: false, | ||
options: { | ||
collectionId: '_pb_users_auth_', | ||
cascadeDelete: true, | ||
minSelect: null, | ||
maxSelect: 1, | ||
displayFields: null | ||
} | ||
}, | ||
{ | ||
system: false, | ||
id: 'ykt3zolr', | ||
name: 'name', | ||
type: 'text', | ||
required: true, | ||
presentable: false, | ||
unique: false, | ||
options: { | ||
min: null, | ||
max: null, | ||
pattern: '' | ||
} | ||
} | ||
], | ||
indexes: ['CREATE INDEX `idx_VTowXf1` ON `profiles` (`name`)'], | ||
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('etdl54k56vwybrn'); | ||
|
||
return dao.deleteCollection(collection); | ||
} | ||
); |
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,81 @@ | ||
/// <reference path="../pb_data/types.d.ts" /> | ||
migrate( | ||
(db) => { | ||
const collection = new Collection({ | ||
id: 'i7mafqbep52hivh', | ||
created: '2024-06-19 22:00:53.918Z', | ||
updated: '2024-06-19 22:00:53.918Z', | ||
name: 'characters', | ||
type: 'base', | ||
system: false, | ||
schema: [ | ||
{ | ||
system: false, | ||
id: 'mn4unycx', | ||
name: 'name', | ||
type: 'text', | ||
required: true, | ||
presentable: false, | ||
unique: false, | ||
options: { | ||
min: null, | ||
max: null, | ||
pattern: '' | ||
} | ||
}, | ||
{ | ||
system: false, | ||
id: '47sgeg6w', | ||
name: 'displayName', | ||
type: 'text', | ||
required: true, | ||
presentable: false, | ||
unique: false, | ||
options: { | ||
min: null, | ||
max: null, | ||
pattern: '' | ||
} | ||
}, | ||
{ | ||
system: false, | ||
id: 'urnacitl', | ||
name: 'element', | ||
type: 'select', | ||
required: true, | ||
presentable: false, | ||
unique: false, | ||
options: { | ||
maxSelect: 1, | ||
values: ['pyro', 'hydro', 'anemo', 'electro', 'dendro', 'cryo', 'geo'] | ||
} | ||
}, | ||
{ | ||
system: false, | ||
id: 'mhmjqqet', | ||
name: 'visible', | ||
type: 'bool', | ||
required: false, | ||
presentable: false, | ||
unique: false, | ||
options: {} | ||
} | ||
], | ||
indexes: ['CREATE UNIQUE INDEX `idx_Fd6ZMqS` ON `characters` (`name`)'], | ||
listRule: 'visible = true', | ||
viewRule: 'visible = true', | ||
createRule: null, | ||
updateRule: null, | ||
deleteRule: null, | ||
options: {} | ||
}); | ||
|
||
return Dao(db).saveCollection(collection); | ||
}, | ||
(db) => { | ||
const dao = new Dao(db); | ||
const collection = dao.findCollectionByNameOrId('i7mafqbep52hivh'); | ||
|
||
return dao.deleteCollection(collection); | ||
} | ||
); |
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,27 @@ | ||
/// <reference path="../pb_data/types.d.ts" /> | ||
migrate( | ||
(db) => { | ||
const dao = new Dao(db); | ||
const collection = dao.findCollectionByNameOrId('etdl54k56vwybrn'); | ||
|
||
collection.listRule = '@request.auth.id = user.id'; | ||
collection.viewRule = '@request.auth.id = user.id'; | ||
collection.createRule = '@request.auth.id = user.id'; | ||
collection.updateRule = '@request.auth.id = user.id'; | ||
collection.deleteRule = '@request.auth.id = user.id'; | ||
|
||
return dao.saveCollection(collection); | ||
}, | ||
(db) => { | ||
const dao = new Dao(db); | ||
const collection = dao.findCollectionByNameOrId('etdl54k56vwybrn'); | ||
|
||
collection.listRule = null; | ||
collection.viewRule = null; | ||
collection.createRule = null; | ||
collection.updateRule = null; | ||
collection.deleteRule = null; | ||
|
||
return dao.saveCollection(collection); | ||
} | ||
); |
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,76 @@ | ||
/// <reference path="../pb_data/types.d.ts" /> | ||
migrate( | ||
(db) => { | ||
const collection = new Collection({ | ||
id: '2q5l1u64zseldm9', | ||
created: '2024-06-19 22:03:57.192Z', | ||
updated: '2024-06-19 22:03:57.192Z', | ||
name: 'votes', | ||
type: 'base', | ||
system: false, | ||
schema: [ | ||
{ | ||
system: false, | ||
id: 'reelx3nj', | ||
name: 'profile', | ||
type: 'relation', | ||
required: true, | ||
presentable: false, | ||
unique: false, | ||
options: { | ||
collectionId: 'etdl54k56vwybrn', | ||
cascadeDelete: true, | ||
minSelect: null, | ||
maxSelect: 1, | ||
displayFields: null | ||
} | ||
}, | ||
{ | ||
system: false, | ||
id: 'oryeao7u', | ||
name: 'character', | ||
type: 'relation', | ||
required: true, | ||
presentable: false, | ||
unique: false, | ||
options: { | ||
collectionId: 'i7mafqbep52hivh', | ||
cascadeDelete: true, | ||
minSelect: null, | ||
maxSelect: 1, | ||
displayFields: null | ||
} | ||
}, | ||
{ | ||
system: false, | ||
id: 'sllown1l', | ||
name: 'nick', | ||
type: 'text', | ||
required: true, | ||
presentable: false, | ||
unique: false, | ||
options: { | ||
min: null, | ||
max: null, | ||
pattern: '' | ||
} | ||
} | ||
], | ||
indexes: ['CREATE UNIQUE INDEX `idx_TdQeCRY` ON `votes` (\n `profile`,\n `character`\n)'], | ||
listRule: '@request.auth.id != ""', | ||
viewRule: '@request.auth.id != ""', | ||
createRule: '@request.auth.id = profile.user.id', | ||
updateRule: '@request.auth.id = profile.user.id', | ||
deleteRule: '@request.auth.id = profile.user.id', | ||
options: {} | ||
}); | ||
|
||
return Dao(db).saveCollection(collection); | ||
}, | ||
(db) => { | ||
const dao = new Dao(db); | ||
const collection = dao.findCollectionByNameOrId('2q5l1u64zseldm9'); | ||
|
||
return dao.deleteCollection(collection); | ||
} | ||
); |
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,21 @@ | ||
/// <reference path="../pb_data/types.d.ts" /> | ||
migrate( | ||
(db) => { | ||
const dao = new Dao(db); | ||
const collection = dao.findCollectionByNameOrId('etdl54k56vwybrn'); | ||
|
||
collection.listRule = '@request.auth.id != ""'; | ||
collection.viewRule = '@request.auth.id != ""'; | ||
|
||
return dao.saveCollection(collection); | ||
}, | ||
(db) => { | ||
const dao = new Dao(db); | ||
const collection = dao.findCollectionByNameOrId('etdl54k56vwybrn'); | ||
|
||
collection.listRule = '@request.auth.id = user.id'; | ||
collection.viewRule = '@request.auth.id = user.id'; | ||
|
||
return dao.saveCollection(collection); | ||
} | ||
); |
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,21 @@ | ||
/// <reference path="../pb_data/types.d.ts" /> | ||
migrate( | ||
(db) => { | ||
const dao = new Dao(db); | ||
const collection = dao.findCollectionByNameOrId('i7mafqbep52hivh'); | ||
|
||
collection.listRule = '@request.auth.id != "" && visible = true'; | ||
collection.viewRule = '@request.auth.id != "" && visible = true'; | ||
|
||
return dao.saveCollection(collection); | ||
}, | ||
(db) => { | ||
const dao = new Dao(db); | ||
const collection = dao.findCollectionByNameOrId('i7mafqbep52hivh'); | ||
|
||
collection.listRule = 'visible = true'; | ||
collection.viewRule = 'visible = true'; | ||
|
||
return dao.saveCollection(collection); | ||
} | ||
); |
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,25 @@ | ||
/// <reference path="../pb_data/types.d.ts" /> | ||
migrate( | ||
(db) => { | ||
const dao = new Dao(db); | ||
const collection = dao.findCollectionByNameOrId('2q5l1u64zseldm9'); | ||
|
||
collection.name = 'nicks'; | ||
collection.indexes = [ | ||
'CREATE UNIQUE INDEX `idx_TdQeCRY` ON `nicks` (\n `profile`,\n `character`\n)' | ||
]; | ||
|
||
return dao.saveCollection(collection); | ||
}, | ||
(db) => { | ||
const dao = new Dao(db); | ||
const collection = dao.findCollectionByNameOrId('2q5l1u64zseldm9'); | ||
|
||
collection.name = 'votes'; | ||
collection.indexes = [ | ||
'CREATE UNIQUE INDEX `idx_TdQeCRY` ON `votes` (\n `profile`,\n `character`\n)' | ||
]; | ||
|
||
return dao.saveCollection(collection); | ||
} | ||
); |
Oops, something went wrong.