Rename i18n messages table

I’ve imported my 3.x solution into Servoy 5. That went quite good! 8)
Now I would like to rename the messages table to something like i18n_messages.
Not a problem for a database tool, but how do I fix this in Servoy 5 :?:

Hi Karel,

did you already install the SQL explorer in Servoy 5? (It’s new but optional)
Now you can execute the SQL to rename the table.
This last bit can be a bit tricky, there’s different syntax for different db’s

Hope this helps!

mboegem:
Hi Karel,
did you already install the SQL explorer in Servoy 5? (It’s new but optional)
Now you can execute the SQL to rename the table.
This last bit can be a bit tricky, there’s different syntax for different db’s

Hi Marc, renaming the table is not the problem, but how do I fix the -broken- relations and forms (to and from the messages table), after renaming the table?
And since the i18n messages are now located in a workspace in a file or in the SVN server, how do I sync the -existing- messages into the renamed table?
I hope I made myself a bit more clear…

Hmmm that’s something I haven’t done all the way before.

Anyway, of what I know is: Once a table is ‘gone’ from your database, Servoy will prompt you with warnings & errors in the problem pane.
This way it should be quite easy to locate the places where the references to your original table were.

When you change the default i18n table of the solution to your new table, I guess getting the sync with the solution again is just a rightclick and select ‘create from Db’ at the i18n files node. (assuming that the i18n data is already in your table)

As I said: I didn’t try this all the way, so maybe you should setup a small testsolution…

but how do I fix the -broken- relations and forms (to and from the messages table), after renaming the table?

i’m not sure so servoy staff can confirm.

I noticed in my workspace :

  • some .rel text files containing the relation object defintion
  • the relation between forms are described by the relation name
  • the relation in value list are defined by name
  • the name of the relation is used in the code

So you could maybe look for a search and replace in the *.rel files for foreignTableName:“your_old_i18n_table” by foreignTableName:“your_new_i18n_table”

how do I sync the -existing- messages into the renamed table?

Maybe just copy and past in your i18n .properties file in the ressources\messages folder of your workspace

Karel Broer:
I’ve imported my 3.x solution into Servoy 5. That went quite good! 8)
Now I would like to rename the messages table to something like i18n_messages.
Not a problem for a database tool, but how do I fix this in Servoy 5 :?:

Shouldn’t be a problem, just rename the table and configure your solutions to use the new table for i18n (select the solution and change the i18NTable property).
For deployment open the Admin pages and change the defaultMessagesTable property.
You don’t need to do anything else unless you have built your logic (forms, relationships, code, etc) directly against that table.

ngervasi:
You don’t need to do anything else unless you have built your logic (forms, relationships, code, etc) directly against that table.

Hi Nicola, I’m afraid we did built some logic against that table :wink: .
Gladly we found a way to fix this, so I think my question is answered. Thanks!

Woops… read your second post too late… :)