If your solution has no reference to that table (a form, relation, value list, …) then that table is only created if you chose to include all tables from server in the export settings. If you don’t like that for other reasons, you have to create “something” based on that table. Expected behavior, yes.
I have also been bitten by this in the past. You create a table, add some code in global scope to manipulate the data using databaseManager.createFoundSet(server, table name).
Everything works fine, you test, then you import on the liver server and your solution fails because the table is missing…
There should at least be a warning to create a form…
There are a few scenarios for creating tables in your database:
Let Servoy do it automatically. This requires that it knows about it by referencing it on any of the following objects:
form
relation
valuelist
Essentially any Servoy object other than javascript code.
However Servoy will never change schema objects or remove them. It will only add new ones.
[/*:m]
Tell Servoy to export the solution including ALL tables of the used connections.
I believe this requires that there are dbi files of these tables (and the connection is used somewhere other than in code).
And I don’t think Servoy will change/remove schema objects here either. Only add new ones.
[/*:m]
Create/change/remove them manually using any SQL query tool before you import the solution.
This requires that you restart the server or else it doesn’t see your schema changes.
Or set the import setting to not allow schema changes and let the import fail a couple times until it doesn’t find any new schema changes.
[/*:m]
Use the pre- and post hooks in your solution and write code to do all your schema changes. This will run before/after your solution gets imported.
This is essentially the automated form of doing it manually since you decide what to add/remove/change.[/*:m][/list:u]
I have customers with databases with 5000 tables. They don’t want to have them all included and I’m sure they don’t want any warnings like that…
Neither would I, but I have written code referencing one of those 5,000 and Servoy is not going to create that one table for me, I’d like to know.
As Servoy is progressing, we have been moving from a FileMaker-style form-based environment to something a lot more advanced. If I place code in the table scope I expect the table to be created, not to have to create a form.