Comments (3)
OK, so I think i might have this sorted!
First-time run of the app needed to be in development mode to create the database tables.
Here's the relevant Part of the docs
If you are using a relational database such as MySQL, there is an additional step. Remember how Sails sets all your models to migrate:safe when run in production? That means no auto-migrations are run when lifting the app...which means by default your tables won't exist. A common approach to deal with this during the first-time setup of a relational database for your Sails app goes as follows:
Create the database on the production database server (e.g. frenchfryparty)
Configure your app locally to use this production database, but don't set the environment to 'production', and leave your models' configuration set to migrate: 'alter'. Now run sails lift once-- and when the local server finishes lifting, kill it.
Be careful! You should only do this when there is no data in the production database.
If this makes you nervous or if you can't connect to the production database remotely, you can skip the steps above. Instead, simply dump your local schema and import it into the production database.
I lost hours on this one!
from dokku-mysql.
It would be great if you could make a pull request against our documentation - in the docs repo - in regards to this issue. Would help the next person not lose hours on this one :)
from dokku-mysql.
Thinking this through further, there is no reason to believe that dokku should make any claim as to what is in your database. It is wholly up to the developer to apply any database migrations, and noting down how each and every web framework deals with this problem is wayyyy outside the scope of what dokku does.
from dokku-mysql.
Related Issues (20)
- mysql:backup produces "repository name must be lowercase HOT 4
- We have spotted a crypto miner inside mysql container HOT 1
- Mysql 8 HOT 1
- Backup all databases instead of the one which is called like the service HOT 2
- Add a `mysql:login` command HOT 2
- Inserting non english characters in mysql shell
- How to make user restrictions to execute some commands as connect or import. HOT 1
- Maximum number of databases is 23 HOT 1
- how to execute a commands on the mysql container ? HOT 1
- tunneling into mysql:connect HOT 1
- How to use plugin with remote MySQL server? HOT 1
- mysql: not found in the container after MySQL update HOT 2
- A way to restore service container HOT 12
- Keeping config changes between deploys HOT 5
- Cannot upgrade mysql service HOT 5
- Cannot export/backup DB HOT 8
- Failed to create a backup manually HOT 2
- Custom config not being loaded - MySQL 5.7.4 HOT 2
- Add retention support for backups HOT 1
- Error when trying to schedule backups HOT 1
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 dokku-mysql.