Comments (2)
Make sure that the app system migrations are applied - ./pocketbase migrate up
.
They usually are executed automatically on serve but this happens after the bootstrap hook.
Additionally if you are trying to create collections programmatically please check https://pocketbase.io/docs/js-migrations/.
from pocketbase.
For all future users that are having problems with on start db creation , this is how I handled that using the migration docs:
// pb_migrations/1687801090_initial_schema.js
migrate((db) => {
const dao = new Dao(db);
// create settings collection
const settings = new Collection({
name: 'settings',
type: 'base',
schema: [
{
name: 'name',
type: 'text',
required: false,
options: {
min: null,
max: null,
pattern: ''
}
},
{
name: 'current_setting',
type: 'json',
required: false,
options: {}
}
]
});
dao.saveCollection(settings);
}, (db) => {
const dao = new Dao(db);
// revert
dao.deleteCollection(settings);
});
from pocketbase.
Related Issues (20)
- Duplciate field names allowed in pb_migrations file HOT 2
- Proposal: add id, created, updated to RecordModel.data in Dart SDK HOT 2
- Creating an auth record in a JS route in a transaction
- last page
- Access sql.Conn HOT 1
- Improve documentation on creating a new user from Golang HOT 1
- Issue: Infinite Refresh Loop @ Homepage (Fresh Install)
- Feature Request: Add "nontruthy" option to boolean field type HOT 2
- Feature Request: Automatic saving of shema json when using go framework HOT 1
- Integrations test ApiScinarios force ExpectedEvents HOT 4
- Proposal : Add color / custom class to .col-type-bool in Admin UI for true/false HOT 2
- Feature Request: Add Username in Logs HOT 1
- File uploading in React-Native doesn't work HOT 8
- Feature Request: Add optional comment / description field to the collection fields API rules HOT 2
- Bug: If you create a column named "active" then updates switch it to false or 0 if its a number field HOT 2
- No way to remove authStore.onChange() handler
- Scope doesn't return the data asked from scope on flutter HOT 1
- Suggestion: add upload-meter to backups
- Question: Can hooks be in subfolders of `pb_hooks`? HOT 1
- I want to write files in jshook to upload to collections how to do it
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pocketbase.