简体   繁体   中英

db-migrate insert data from csv

I need to insert data in to my postgresql via db-migrate for my serverless app. So I have 4 table and each table has it's own csv data. Due to the number of record, I need to do it automatically, any advice? thanks

You could:

  • create a lambda that will use db-migrate to perform whatever operation you need to do
  • install serverless-scriptable-plugin
  • invoke the function you created immediately after each deploy (by literally running serverless invoke -f yourfunction )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM