Closed GoogleCodeExporter closed 9 years ago
This doesn't make sense to me - I can't repro as described.
Original comment by robcon...@gmail.com
on 9 Apr 2009 at 3:29
Closing - please re-open when you have more details.
Original comment by robcon...@gmail.com
on 11 Apr 2009 at 1:43
This migration fails for me on SQL Server 2005 Express Edition:
Message in output window:
"There was an error running migration (034_Test): Incorrect syntax near the
keyword 'PROCEDURE'."
namespace DataAccess.Migrations
{
public class Migration034 : Migration
{
public override void Up()
{
Execute(@"
CREATE PROCEDURE sp_testBug1
AS
BEGIN
SELECT 1 + 1 as SUM1
END
CREATE PROCEDURE sp_testBug2
AS
BEGIN
SELECT 2 + 2 as SUM2
END
");
}
public override void Down() { }
}
}
Original comment by powerpo...@gmail.com
on 16 Apr 2009 at 9:32
You have either to use 2 Excute Statements:
Execute(@"CREATE ...");
Execute(@"CREATE ...");
or put a ";" between
END
CREATE
it should read:
END;
CREATE
otherwise the dbms thinks it is one statement and that failes
Original comment by j.steinblock@gmail.com
on 16 Apr 2009 at 10:39
I tried with the semicolon after "END", but no go. I also tried with 2 inserts,
but i
still get the same error message:
public override void Up()
{
Execute(@"
CREATE PROCEDURE sp_testBug1
AS
BEGIN
SELECT 1 + 1 as SUM1
END;"
);
Execute(@"
CREATE PROCEDURE sp_testBug2
AS
BEGIN
SELECT 2 + 2 as SUM2
END;
");
}
Is this working OK for everyone else? Is it just me?
Original comment by powerpo...@gmail.com
on 16 Apr 2009 at 2:13
Original issue reported on code.google.com by
powerpo...@gmail.com
on 1 Apr 2009 at 6:20