Introduction
The python databasemigrationrepository example is extracted from the most popular open source projects, you can refer to the following example for usage.
Programming language: Python
Namespace/package name: oratormigrations
Example#1File:
install_command.pyProject:
dougblack/orator
def handle(self):
"""
Executes the command
"""
database = self.option('database')
repository = DatabaseMigrationRepository(self.resolver, 'migrations')
repository.set_source(database)
repository.create_repository()
self.info('Migration table created successfully')
Example#2File:
install_command.pyProject:
kdriedger-simutech/Orator-Google-App-Engine
def execute(self, i, o):
"""
Executes the command.
:type i: cleo.inputs.input.Input
:type o: cleo.outputs.output.Output
"""
super(InstallCommand, self).execute(i, o)
database = i.get_option('database')
repository = DatabaseMigrationRepository(self._resolver, 'migrations')
repository.set_source(database)
repository.create_repository()
o.writeln(decode('<info>✓ Migration table created successfully</info>'))