Esempio n. 1
0
def parser ( parser ):
    base.with_migration_path(
    base.with_psql_arguments(
        parser
    )).add_argument('MIGRATION_FILE',
        help='the path to the migration file to register'
    )
Esempio n. 2
0
def parser(parser):
    base.with_schema_file(base.with_migration_path(base.with_psql_arguments(parser)))

    parser.add_argument("MIGRATION_NAME", help="the name of the migration to apply")

    parser.add_argument(
        "-u",
        "--up-from",
        action="store_const",
        const=True,
        dest="direction",
        default=True,
        help='apply the migration in the "UP" direction',
    )

    parser.add_argument(
        "-D",
        "--down-to",
        action="store_const",
        const=False,
        dest="direction",
        help='apply the migration in the "DOWN" direction',
    )

    parser.add_argument(
        "--dump",
        action="store_const",
        const=True,
        dest="dump_schema",
        default=False,
        help="Also dump the contents of the DB schema into SCHEMA_FILE if successful",
    )
Esempio n. 3
0
def parser ( parser ):
    base.with_schema_file(
    base.with_migration_path(
    base.with_migration_name(
        parser
    )))

    parser.add_argument('--long-hash', action='store_true',
        help='use the full-length HASH in MIGRATION_NAME if "--migration-name" is not provided'
    )

    parser.add_argument('-f', '--force', action='store_true', dest='force',
        help='force overwrite of existing migration file'
    )