c# - Updating big table inside migration -


i've created migration update values in 1 column. migration looks follow:

public partial class updatestatuses : dbmigration {     public override void up()     {         var updatesql = @"             begin                 update article set status = case when status <> -1 status + 1 else status end,                     statusprev = case when statusprev <> -1 statusprev + 1 else statusprev end;             end;";         sql(updatesql, true);     }      public override void down()     {         var updatesql = @"             begin                 update article set status = case when status <> -1 status - 1 else status end,                     statusprev = case when statusprev <> -1 statusprev - 1 else statusprev end;             end;";         sql(updatesql, true);     } } 

migration works fine on smaller datasets, table migration designed run on has ~11m of records. when i'm running it throw me such exception:

engine task errororacle.manageddataaccess.client.oracleexception (0x00001ff1): ora-08177: can't serialize access transaction ora-06512: @ line 3

can can this?


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -