File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -869,11 +869,40 @@ var SchemaTests = []ScriptTest{
869869 },
870870 },
871871 },
872+ {
873+ Name : "drop schema" ,
874+ Focus : true ,
875+ SetUpScript : []string {
876+ "CREATE SCHEMA dropme" ,
877+ "CREATE schema hasTables" ,
878+ "CREATE TABLE hasTables.t1 (pk BIGINT PRIMARY KEY, v1 BIGINT);" ,
879+ },
880+ Assertions : []ScriptTestAssertion {
881+ {
882+ Query : "Show schemas" ,
883+ Expected : []sql.Row {
884+ {"dolt" },
885+ {"dropme" },
886+ {"hasTables" },
887+ {"pg_catalog" },
888+ {"public" },
889+ {"information_schema" },
890+ },
891+ },
892+ {
893+ Query : "DROP SCHEMA dropme;" ,
894+ Expected : []sql.Row {},
895+ },
896+ {
897+ Query : "DROP SCHEMA dropme;" ,
898+ ExpectedErr : "schema dropme does not exist" ,
899+ },
900+ },
901+ },
872902 // More tests:
873903 // * alter table statements, when they work better
874904 // * AS OF (when supported)
875905 // * revision qualifiers
876- // * drop schema
877906 // * more statement types
878907 // * INSERT INTO schema1 SELECT FROM schema2
879908 // * Subqueries accessing different schemas in the same SELECT
You can’t perform that action at this time.
0 commit comments