What's the most efficient way to add many records to the development database?

Hi,

I would like to add a few hundred records to a few tables in the development database. Here are a few options I can think of but wondering if there are other better ones.

Option 1: use the view/edit data function within Wappler. I believe I can’t copy paste a full table but rather have to edit cell by cell right?

Option 2: set up a CSV upload. I don’t need this feature for any user. It would just be for me. It seems a bit inefficient to build out this feature just for me.

Option 3: directly edit the databse within docker. Is this possible?

Option 4: host database somewhere else than within a docker (e.g. RDS) and use the database tool there to upload values.

Option 5: manually edit the migration file to have more “INSERT” statements and “rollback” to the edited version

On a related note, how should I set up the production version of this application? If I’m using AWS, would the best practice be:

  1. host the docker following https://docs.wappler.io/t/setup-aws-hosting-with-docker/23867 and
  2. then the database separately (not within the docker) on S3 following https://docs.wappler.io/t/setup-s3-on-aws/23618? how would I do it if I wanted to use RDS?

Thanks!

The way I would usually tackle this (PHP, MySQL/MariaDB with phpMyAdmin installed) would be to simply use the Import function for each table with a CSV file upload. phpMyAdmin is available on Docker Hub.

Another method I use is connecting to the database with a program, in my case Sequel Pro (although Navicat is mentioned frequently on here), and completing the Import function using CSV.

If it’s going to be a regular function that you require in your app or for your users to Import, then I would suggest building out the CSV upload feature in Wappler and then using a server action database insert step.

I can’t comment much on editing migration files but I’d advise against doing this unless you are sure you know what you are doing.

Hope this helps.