Ejemplo n.º 1
0
    def setUp(self):
        if not os.path.exists(os.path.abspath('migrations')):
            os.mkdir(os.path.abspath('migrations'))
        self.config = create_config(migrations_dir='.:migrations')
        self.test_migration_files = []

        self.test_migration_files.append(os.path.abspath(create_migration_file('20090214115100_01_test_migration.migration', 'foo', 'bar')))
        self.test_migration_files.append(os.path.abspath(create_migration_file('migrations/20090214115200_02_test_migration.migration', 'foo', 'bar')))
        self.test_migration_files.append(os.path.abspath(create_migration_file('20090214115300_03_test_migration.migration', 'foo', 'bar')))
        self.test_migration_files.append(os.path.abspath(create_migration_file('20090214115400_04_test_migration.migration', 'foo', 'bar')))
        self.test_migration_files.append(os.path.abspath(create_migration_file('migrations/20090214115500_05_test_migration.migration', 'foo', 'bar')))
        self.test_migration_files.append(os.path.abspath(create_migration_file('migrations/20090214115600_06_test_migration.migration', 'foo', 'bar')))
Ejemplo n.º 2
0
    def setUp(self):
        super(SimpleDBMigrateTest, self).setUp()
        if not os.path.exists(os.path.abspath('migrations')):
            os.mkdir(os.path.abspath('migrations'))
        self.config = create_config(migrations_dir='.:migrations')
        self.test_migration_files = []

        self.test_migration_files.append(os.path.abspath(create_migration_file('20090214115100_01_test_migration.migration', 'foo', 'bar')))
        self.test_migration_files.append(os.path.abspath(create_migration_file('migrations/20090214115200_02_test_migration.migration', 'foo', 'bar')))
        self.test_migration_files.append(os.path.abspath(create_migration_file('20090214115300_03_test_migration.migration', 'foo', 'bar')))
        self.test_migration_files.append(os.path.abspath(create_migration_file('20090214115400_04_test_migration.migration', 'foo', 'bar')))
        self.test_migration_files.append(os.path.abspath(create_migration_file('migrations/20090214115500_05_test_migration.migration', 'foo', 'bar')))
        self.test_migration_files.append(os.path.abspath(create_migration_file('migrations/20090214115600_06_test_migration.migration', 'foo', 'bar')))
 def setUp(self):
     create_migration_file('20090214120600_example_file_name_test_migration.migration', sql_up='xxx', sql_down='yyy')
     create_migration_file('20090214121600_example_file_name_with_dash-test_migration.migration', sql_up='xxx', sql_down='yyy')
     create_migration_file('20090727104700_test_migration.migration', sql_up='xxx', sql_down='yyy')
     create_migration_file('20090727141400_test_migration.migration', sql_up='xxx', sql_down='yyy')
     create_migration_file('20090727141503_test_migration.migration', sql_up='xxx', sql_down='yyy')
     create_migration_file('20090727141505_01_test_migration.migration', sql_up='xxx', sql_down='yyy')
     create_migration_file('20090727141505_02_test_migration.migration', sql_up='xxx', sql_down='yyy')
     create_migration_file('20090727113900_empty_sql_up_test_migration.migration', sql_up='', sql_down='zzz')
     create_migration_file('20090727113900_empty_sql_down_test_migration.migration', sql_up='zzz', sql_down='')
     create_file('20090727114700_empty_file_test_migration.migration')
     create_file('20090727114700_without_sql_down_test_migration.migration', 'SQL_UP=""')
     create_file('20090727114700_without_sql_up_test_migration.migration', 'SQL_DOWN=""')
Ejemplo n.º 4
0
 def setUp(self):
     create_migration_file('20090214120600_example_file_name_test_migration.migration', sql_up='xxx', sql_down='yyy')
     create_migration_file('20090727104700_test_migration.migration', sql_up='xxx', sql_down='yyy')
     create_migration_file('20090727141400_test_migration.migration', sql_up='xxx', sql_down='yyy')
     create_migration_file('20090727141503_test_migration.migration', sql_up='xxx', sql_down='yyy')
     create_migration_file('20090727141505_01_test_migration.migration', sql_up='xxx', sql_down='yyy')
     create_migration_file('20090727141505_02_test_migration.migration', sql_up='xxx', sql_down='yyy')
     create_migration_file('20090727113900_empty_sql_up_test_migration.migration', sql_up='', sql_down='zzz')
     create_migration_file('20090727113900_empty_sql_down_test_migration.migration', sql_up='zzz', sql_down='')
     create_file('20090727114700_empty_file_test_migration.migration')
     create_file('20090727114700_without_sql_down_test_migration.migration', 'SQL_UP=""')
     create_file('20090727114700_without_sql_up_test_migration.migration', 'SQL_DOWN=""')
     self.migration = Migration(label="generate_test_migration", version="20120101010100", sql_up="some_sql", sql_down="some_sql_down")
Ejemplo n.º 5
0
 def setUp(self):
     create_migration_file(
         '20090214120600_example_file_name_test_migration.migration',
         sql_up='xxx',
         sql_down='yyy')
     create_migration_file(
         '20090214121600_example_file_name_with_dash-test_migration.migration',
         sql_up='xxx',
         sql_down='yyy')
     create_migration_file('20090727104700_test_migration.migration',
                           sql_up='xxx',
                           sql_down='yyy')
     create_migration_file('20090727141400_test_migration.migration',
                           sql_up='xxx',
                           sql_down='yyy')
     create_migration_file('20090727141503_test_migration.migration',
                           sql_up='xxx',
                           sql_down='yyy')
     create_migration_file('20090727141505_01_test_migration.migration',
                           sql_up='xxx',
                           sql_down='yyy')
     create_migration_file('20090727141505_02_test_migration.migration',
                           sql_up='xxx',
                           sql_down='yyy')
     create_migration_file(
         '20090727113900_empty_sql_up_test_migration.migration',
         sql_up='',
         sql_down='zzz')
     create_migration_file(
         '20090727113900_empty_sql_down_test_migration.migration',
         sql_up='zzz',
         sql_down='')
     create_file('20090727114700_empty_file_test_migration.migration')
     create_file('20090727114700_without_sql_down_test_migration.migration',
                 'SQL_UP=""')
     create_file('20090727114700_without_sql_up_test_migration.migration',
                 'SQL_DOWN=""')