Rails - Populate test database with development data

后端 未结 6 1145
没有蜡笔的小新
没有蜡笔的小新 2021-01-31 19:25

Is there any trivial way to copy the data from developmenet database into the test one? I know theres a way to copy schema and recreate database, but is there any rake task to p

6条回答
  •  南方客
    南方客 (楼主)
    2021-01-31 20:06

    With Postgres, copy the database like so:

    CREATE DATABASE newdb WITH TEMPLATE originaldb OWNER dbuser;

提交回复
热议问题