Beispiel #1
0
    def test_ignore_table_evolve_command(self):
        class SomeModel(pw.Model):
            some_field = pw.TimeField(null=True)

            class Meta:
                database = self.db

        self.assertEqual(
            peeweedbevolve.calc_changes(self.db, ignore_tables=['somemodel']),
            [])
Beispiel #2
0
 def check_noop(self):
     self.assertEqual(peeweedbevolve.calc_changes(self.db), [])
Beispiel #3
0
 def test_delete_table(self):
     self.test_create_table()
     peeweedbevolve.clear()
     self.assertEqual(
         peeweedbevolve.calc_changes(self.db)[0][0].split()[:2],
         [u'DROP', u'TABLE'])
Beispiel #4
0
 def evolve_and_check_noop(self):
     self.db.evolve(interactive=INTERACTIVE)
     self.assertEqual(peeweedbevolve.calc_changes(self.db), [])
Beispiel #5
0
 def check_noop(self, schema=None):
     self.assertEqual(peeweedbevolve.calc_changes(self.db, schema=schema),
                      [])