def test_adding_datetime(self): blueprint = Blueprint('users') blueprint.datetime('foo') statements = blueprint.to_sql(self.get_connection(), self.get_grammar()) self.assertEqual(1, len(statements)) self.assertEqual( 'ALTER TABLE `users` ADD `foo` DATETIME NOT NULL', statements[0] )
def test_adding_datetime(self): blueprint = Blueprint('users') blueprint.datetime('foo') statements = blueprint.to_sql(self.get_connection(), self.get_grammar()) self.assertEqual(1, len(statements)) self.assertEqual( 'ALTER TABLE "users" ADD COLUMN "foo" TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL', statements[0])