I am using ef core 2.2 with devart oracle 9.6.696 model-first approach.
Now I want to build up the release pipeline and therefore I use the following command to generate a sql migration script:
Code: Select all
ef migrations script -o scriptfile.sql -i
Unfortunately I get an error at the following statement:
Code: Select all
DECLARE
pCount NUMBER;
BEGIN
pCount := 0;
SELECT count(*) INTO pCount FROM EFMigrationsHistory__ WHERE MigrationId = '20190220090546_MigrationName';
IF (pCount <> 1) THEN
EXECUTE IMMEDIATE '
BEGIN
EXECUTE IMMEDIATE 'ALTER TABLE MyTable MODIFY SomeColumn NOT NULL';
EXCEPTION
WHEN OTHERS THEN
IF SQLCODE <> -1451 AND SQLCODE <> -1442 THEN
RAISE;
END IF;
END;
';
END IF;
END;
/
Code: Select all
migrationBuilder.AlterColumn<string>(
name: "SomeColumn",
table: "MyTable",
maxLength: 10,
nullable: false,
oldClrType: typeof(string),
oldMaxLength: 10,
oldNullable: true);
Code: Select all
EXECUTE IMMEDIATE 'ALTER TABLE MyTable MODIFY SomeColumn NOT NULL';
*
ERROR at line 9:
ORA-06550: line 9, column 26:
PLS-00103: Encountered the symbol "ALTER" when expecting one of the following:
* & = - + ; < / > at in is mod remainder not rem return
returning <an exponent (**)> <> or != or ~= >= <= <> and or
like like2 like4 likec between into using || multiset bulk
member submultiset