Page 1 of 2
How to update database service on change of database columns
Posted: Mon May 19, 2014 3:48 pm
by Deki
It seems like the database services do not refresh with the latest modifications that I make to the database; for example adding a new column. It seems that I need to re-create the service in order to see the updates (i.e. addition of new column) to the database. But, if I need to re-create the service that means deleting all of my work and starting over again. Is there an easier and more efficient way to update database services after changes are made to the database?
Thanks
How to update database service on change of database columns
Posted: Mon May 19, 2014 4:25 pm
by RobertJay
Deki's issue is an issue for me too. If a better approach does not now exist, please consider this a feature request from me. Thanks.
How to update database service on change of database columns
Posted: Mon May 19, 2014 6:08 pm
by Kateryna Grynko
Hi,
1) Do database changes (delete/add column).
2) Run database service test.
3) Automatically create response parameters:
http://docs.appery.io/documentation/r...
How to update database service on change of database columns
Posted: Mon May 19, 2014 6:54 pm
by Deki
Katya,
I have tried that but it doesn't work....actually it makes things worse because it deletes all the current columns from the service...see screenshot
How to update database service on change of database columns
Posted: Tue May 20, 2014 1:13 am
by Igor
Hello,
There are two ways how can you add/delete response parameter.
- Automatically define response
http://docs.appery.io/documentation/r...
2.Or you can add/delete response parameter manually
http://docs.appery.io/documentation/r...
How to update database service on change of database columns
Posted: Wed Jun 04, 2014 4:29 pm
by RobertJay
The first approach works very nicely - thanks Igor for saving me a lot of time.
How to update database service on change of database columns
Posted: Fri Oct 10, 2014 10:05 pm
by Andrew6784445
I just imported the test service response (approach #1 above) but it looks like all mappings and javascript related to my service have been deleted. Is there way to refresh service responses automatically without losing my work? Is there a way to get my mappings and js back easily?
How to update database service on change of database columns
Posted: Fri Oct 10, 2014 10:29 pm
by Illya Stepanov
Hi Andrew,
This is not very clear, could you please describe how exactly you have imported service?
Mapping and JS is a service data details page and there is no easy way to import it or copy, except if the page is created as a template. (http://devcenter.appery.io/documentat...).
How to update database service on change of database columns
Posted: Fri Oct 10, 2014 11:02 pm
by Andrew6784445
I loaded the service from Project | Services. Next, I ran a test and clicked the button "Import as Response". It automatically brought in my new structure for the response parameters in the service. However, when I went to the data tab on my page, my mappings and js tied to the service were gone.
How to update database service on change of database columns
Posted: Fri Oct 10, 2014 11:39 pm
by Illya Stepanov
Import as Response -- only defines response parameters, mapping and JS should be defined manually.