WhiteCoreSim / WhiteCore-Dev

WhiteCoreSim - Software to create your own virtual world
BSD 3-Clause "New" or "Revised" License
26 stars 34 forks source link

The question of adding fields to the database #207

Closed LifeGold closed 8 years ago

LifeGold commented 8 years ago

Good day to all. I have the following question, where in the source files of the server need to change if I for example in a table user_info want to add an additional field. No changes generates an error and does not let on to the server.

Answers better not to do and why can not leave particularly interested in the answer to this question.

He will answer him as Markeplace and an updated website we will be waiting for judging about the development about a year at least. We have decided to do this but to add fields you can't.

greythane commented 8 years ago

All details related to the database structure and fields are held in the appropriate migrator.

For user accounts this can be found in... DataManager/Migration/Migrators/UserAccounts/UserAccountsMigrator_n.cs

To alter fields.. A new unit should be created with the next subsequent number i.e. UserAccountsMigrator_8.cs for the current codebase Change Namespace to reflect the unit name numbering Update the Version of the migrator (Failing to do this will mean the unit is ignored)

Note: Any changes made and not adopted into the main WhiteCore codebase can not be supported by the developers.

BTW: A full market place solution is also being worked on currently.

LifeGold commented 8 years ago

Added as all of the above, now the server issues, that doesn't save the information in the table

[MySQL]: ExecuteNonQuery(insert into user_info values (?A,?B,?C,?D,?E,?F,?G,?H,?I,?J,?K,?L,?M,?N)), MySql.Data.MySqlClient.MySqlException: Column count doesn't match value count at row 1 at MySql.Data.MySqlClient.MySqlStream.ReadPacket () <0x402ac000 + 0x00193> in :0 at MySql.Data.MySqlClient.NativeDriver.GetResult (System.Int32& affectedRow, System.Int64& insertedId) <0x402c1a30 + 0x00037> in :0