I built a Flask app with a SQLite database. Now, I want to actually upload the app for use. I uploaded to Github and connected the Github repo to Heroku but realized that I can't use SQLite with Heroku because the database resets every hour. It seems like using the Heroku Postgres database is best, but I'm not sure how to convert my app. All of the tutorials for creating Postgres flask apps I could find are completely different from each other but equally confusing (either they assume I already have something built that I don't or a step is missing or a first step simply doesn't work). How should I even get started with this?
Related
How the Heroku CLI tool manages DBs. What are the APIs they use? The tasks I am trying to do from the app are create/delete a postgres DB, create a dump, and import a dump using python code and not from the console or cli.
There is no publicly defined API for the Heroku Data products, unfortunately. That said, in my experience, the paths are fairly stable and can mostly be reasoned out. This CLI plugin might give you a head start on trying to work out the routes you'd need to hit in order to achieve your goals.
I'm currently working on a project with some colleagues and a colleague of mine linked a database created in her postgreSQL server to our visual studio project, but we don't know how she can share the database with the rest of us, or how can we modify the database without having it.
We're using postgreSQL 14.
One option is to create your database in a cloud provider such as AWS.
You can take a look at: https://aws.amazon.com/rds/postgresql/
This way all of you will be able to access the database.
I'm new to working with back-end, but have been running into issues trying to get my iOS app to connect to my PostgreSQL DB.
I have developed an app with Swift which is a game that I want to run locally on iOS devices. I have a PostgreSQL DB set up in Google Cloud Platform but I cannot figure out how to get the Swift app to connect to my PostgreSQL DB.
I've read some about using Vapor or Perfect to run the application using Googles App Engine but I'm not sure that is what I want to do since I want the app to run locally but there are a few aspects of my app that I need a global database for.
Would anyone be able to point me in the right direction of how I need to connect my Swift application with Google Cloud's PostgreSQL?
Your question is pretty much very similar to this one.
In short, the correct answer is you shouldn't connect your client side application directly to the database. Instead, you should build a service that can connect to the database, and act as a service between your application. This helps prevent any unauthorized queries to your database and provides better performance. If you wanted to do this on GCP, you could look into something like Google Cloud Functions or Google Cloud App Engine to act as a service.
An alternative would be to use a "Database-as-a-Service" like Cloud Firestore. This is a scalable, pay-as-you-go service with great mobile support.
Yeah sure you need a server, ruby on rails to connect to your Postgres database.
The server will facilitate data back and forth from the Google cloud Postgressql
I have an app running on heroku. This app has a database, I need to move this database from one app to an other app. I was thinking in creating a backup, and then uploading that backup into the new app but I'm sure there must be something easier to do but I can't find how to do it!
My db is the 9 dolar/month, the basic one...
Thanks!
No need - just update the DATABASE_URL config var on your new app with that of the old one.
I have a local version of Strapi set up, and the codebase is pushing fine to Netlify for the frontend and Heroku for the backend.
However, I can't work out how to get the content held in the .tmp/data.db file into the mLab instance of the database on Heroku.
The structure is all in sync with my local version.
I've tried to export tables from SQL Lite to JSON files and then import them as collections using the CLI - which says it's imported the documents into Heroku (and I can see them in the mLab interface), but this was a last ditched attempt as I couldn't see a way of transferring the entire file.
However, this isn't working as the content types are still empty.
Make sure you well configured your ./config/environments/production/database.json with your mLab configs.
In development, you look using SQLite. This database is good for local development but can't be used in Heroku (see the storage system used by Heroku you will understand why.)
Be careful, you are using an SQL database in dev and a NoSQL database in production.
This looks special - depending on your data structure, you can have issues about the data migration. I don't suggest you to do that. Use the same type of database in dev and prod.