def test_drop_column(self): blueprint = Blueprint('users') blueprint.drop_column('foo') statements = blueprint.to_sql(self.get_connection(), self.get_grammar()) self.assertEqual(1, len(statements)) self.assertEqual('ALTER TABLE `users` DROP `foo`', statements[0]) blueprint = Blueprint('users') blueprint.drop_column('foo', 'bar') statements = blueprint.to_sql(self.get_connection(), self.get_grammar()) self.assertEqual(1, len(statements)) self.assertEqual('ALTER TABLE `users` DROP `foo`, DROP `bar`', statements[0])
def test_drop_column(self): blueprint = Blueprint('users') blueprint.drop_column('foo') statements = blueprint.to_sql(self.get_connection(), self.get_grammar()) self.assertEqual(1, len(statements)) self.assertEqual('ALTER TABLE "users" DROP COLUMN "foo"', statements[0]) blueprint = Blueprint('users') blueprint.drop_column('foo', 'bar') statements = blueprint.to_sql(self.get_connection(), self.get_grammar()) self.assertEqual(1, len(statements)) self.assertEqual( 'ALTER TABLE "users" DROP COLUMN "foo", DROP COLUMN "bar"', statements[0])