Jump to content
  • 0

Try 4.9 -> 5.1 Migration tools SQLite to MySQL


AriusII

Question

Hello everyone :) !
I'm looking for some help with the migration tool.
I was doing a projet in v4.9 and tryed to migrate it to 5.1.
I have see they are new way to choice ( keep Lite or go on MySQL ), cause I like to manage it with other tools and better for connect with < web platform >.
My folder's are splitted ( one 4.9 & the other 5.1 )
I have try some way to bypass this error :

 

Spoiler

2019-03-25 07:01:07.812 [Error] Received unhandled exception from .
2019-03-25 07:01:07.813 [Error] Message: An error occurred while updating the entries. See the inner exception for details.
2019-03-25 07:01:07.814 [Error] Stack Trace:    à Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
   à Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(DbContext _, ValueTuple`2 parameters)
   à Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
   à Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable`1 commandBatches, IRelationalConnection connection)
   à Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChanges(IReadOnlyList`1 entries)
   à Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IReadOnlyList`1 entriesToSave)
   à Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)
   à Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)
   à Microsoft.EntityFrameworkCore.DbContext.SaveChanges()
   à Intersect.Migration.UpgradeInstructions.Upgrade_12.Upgrade12.Upgrade() dans C:\Users\JC Snider\Desktop\AGD\Intersect-Engine\Intersect.Migration.Tool\UpgradeInstructions\Upgrade_12\Upgrade12.cs:ligne 399
   à Intersect.Migration.UpgradeInstructions.Upgrade_11.Upgrade11.Upgrade() dans C:\Users\JC Snider\Desktop\AGD\Intersect-Engine\Intersect.Migration.Tool\UpgradeInstructions\Upgrade_11\Upgrade11.cs:ligne 273
   à Intersect.Migration.Database.Upgrade() dans C:\Users\JC Snider\Desktop\AGD\Intersect-Engine\Intersect.Migration.Tool\Database.cs:ligne 160
   à Intersect.Migration.Migrator.Start(String[] args) dans C:\Users\JC Snider\Desktop\AGD\Intersect-Engine\Intersect.Migration.Tool\Migrator.cs:ligne 57
2019-03-25 07:01:07.821 [Error] Stack Trace:    à MySql.Data.MySqlClient.MySqlDataReader.ActivateResultSet(ResultSet resultSet)
   à MySql.Data.MySqlClient.MySqlDataReader.<ReadFirstResultSetAsync>d__92.MoveNext()
--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---
   à System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   à MySql.Data.MySqlClient.MySqlDataReader.<CreateAsync>d__91.MoveNext()
--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---
   à System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   à System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   à MySqlConnector.Core.TextCommandExecutor.<ExecuteReaderAsync>d__1.MoveNext()
--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---
   à System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   à MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   à System.Data.Common.DbCommand.ExecuteReader()
   à Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
   à Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
   à Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
2019-03-25 07:01:07.822 [Error] Time: 3/25/2019 7:01:07 AM

--------------------------------------------------------------------------------


This happen when I do the second step.

What i've tryed to do.
_ Tryed to use ( on my 4.9 Server ) the both files ( Intersect.db & sqlite.dll ) click & drag on migration tool ( locate on the 5.1 server folder )
  -> Only sqlite.dll do the change.
  -> First informations are added ( first step of connection )
  -> During the second step the error appear.

_ Using Navicat, reading the SQLite file of my 4.9 server, have making a dump of all informations.
  -> Successfully to log on my localhost database mysql with server 5.1 ( config.json )
  -> Server INSERT tables into mysql database(clean table/DB)
  -> Tryed to execute the DUMP files ( like a backup ), but gettings errors.

Thanks if you could help me :) !

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Hello thanks for this fast reply :) !
I'm using < WampServer > with this DB features 
MySQL 5.7.24 – MariaDB 10.3.12

The first Step ( Player's Database ) work like a charm :) ! ( SQLite to MySQL ) 
The second Step ( World Database ) Don't want run correctly ( SQLite to MySQL ) ( gettings the errors sended just before ) but, it's working if I select migrate 4.9 Lite to 5.1 Lite :)

Link to comment
Share on other sites

  • 0

Hello back !
Thanks for this reply .. !
I have try to do the migrate command, and when I have try to put the same informations, it's saying ->
 

Spoiler

"mysqlnotempty": "Database must be empty before migration! Please delete any tables before proceeding!",


So I just doing a second database ( like what it's actually do with SQLite ), I was trying to work with only 1 DB like old version of intersect...

I have create 2 Databases ( Player & Game ) and the migration ( with server works ! )

I have try to do it with Migration Tool with the two databases, it's worked too !

So conclusion we need 2 DataBases for making works.

Note : When you just extract the Server Files Folder ( 4 files , migration + pdb / Server + pdb ) when you launch the server the first time, edit the config.json, change the DB connexion type with MySQL and using for both the same Database, and remove all other files execpt the 4 first + config.json.
All informations are correctly insert without error, and the server run without problems.

Ps: I think it's better to write it somewhere for not having the same probleme issue, of course it's my fault if I just put 1 DB and not 2 like it's say now for SQLite, yeah this fell really assist but i was creat only 1 DB cause I have see it's working with starting clean files so at this point I was not in search to make 2 DB's x) !

Thanks you @jcsnider :)

Link to comment
Share on other sites

×
×
  • Create New...