From 132339026ada1d2349441d283e51d44d937355b4 Mon Sep 17 00:00:00 2001 From: Sergey Kurt Date: Mon, 13 Mar 2017 16:24:08 +0300 Subject: [PATCH] Regular expression for FK destroyer --- templates_test/singleton/boil_queries_test.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates_test/singleton/boil_queries_test.tpl b/templates_test/singleton/boil_queries_test.tpl index f9c56b7..45ff788 100644 --- a/templates_test/singleton/boil_queries_test.tpl +++ b/templates_test/singleton/boil_queries_test.tpl @@ -9,7 +9,7 @@ func MustTx(transactor boil.Transactor, err error) boil.Transactor { var rgxPGFkey = regexp.MustCompile(`(?m)^ALTER TABLE ONLY .*\n\s+ADD CONSTRAINT .*? FOREIGN KEY .*?;\n`) var rgxMySQLkey = regexp.MustCompile(`(?m)((,\n)?\s+CONSTRAINT.*?FOREIGN KEY.*?\n)+`) -var rgxMSSQLkey = regexp.MustCompile(`(?m)^ALTER TABLE .*\n\s+ADD CONSTRAINT .*? FOREIGN KEY .*?;\n`) +var rgxMSSQLkey = regexp.MustCompile(`(?m)^ALTER TABLE .*ADD\s+CONSTRAINT .* FOREIGN KEY.*?.*\n?REFERENCES.*`) func newFKeyDestroyer(regex *regexp.Regexp, reader io.Reader) io.Reader { return &fKeyDestroyer{