copy_database

copy_database(self, dbtype, connection, limit=1000)

domain: server

language: python

class Task class

Description

Use copy_database to copy database data when migrating to another database.

See How to migrate to another database

Example

in the following code when the project task tree is created the application copies the data from the demo.sqlite database to the project database:

from jam.common import consts
def copy_db(task):
    task.copy_database(consts.SQLITE, 'demo.sqlite')
def on_created(task):
    copy_db(task)