I've created migration to update values in one column. Migration looks as follow:
public partial class UpdateStatuses : DbMigration
{
public override void Up()
{
var updateSql = @"
BEGIN
UPDATE ARTICLE SET STATUS = CASE WHEN STATUS <> -1 THEN STATUS + 1 ELSE STATUS END,
STATUSPREV = CASE WHEN STATUSPREV <> -1 THEN STATUSPREV + 1 ELSE STATUSPREV END;
END;";
Sql(updateSql, true);
}
public override void Down()
{
var updateSql = @"
BEGIN
UPDATE ARTICLE SET STATUS = CASE WHEN STATUS <> -1 THEN STATUS - 1 ELSE STATUS END,
STATUSPREV = CASE WHEN STATUSPREV <> -1 THEN STATUSPREV - 1 ELSE STATUSPREV END;
END;";
Sql(updateSql, true);
}
}
Migration works fine on smaller datasets, but table which this migration is designed to run on has ~11M of records. So when I'm running it it throw me such exception:
Engine task ErrorOracle.ManagedDataAccess.Client.OracleException (0x00001FF1): ORA-08177: can't serialize access for this transaction ORA-06512: at line 3
Can I can do something with this?