How to create an in-memory database with schema based on an existing file database

后端 未结 2 804
轮回少年
轮回少年 2021-01-23 06:10

I have an existing database which structure is used accross the whole application. Instances of the databases are periodically rotated. I have a database file template.sql

2条回答
  •  花落未央
    2021-01-23 06:36

    You could use the .dump command of the command-line shell do create a bunch of SQL commands that you can execute.

    Alternatively, you can use the backup API to copy the template into a new database.

提交回复
热议问题