Support Topics Documentation Slack YouTube Blog

Default values missing when import data


(Marcio) #1

Hi guys, I get all data tables default values missing when I imported the base data to a new table. Fortunately, I still have another App and I will compare one by one and fix it otherwise I’d be lost.

After imported:

Note: that happened on all tables.


(Mark Piller) #2

Hi @MARCIO_PRUDENCIO,

CSV data export doesn’t include default values, constraints and validators. As a result, when you import the data as CSV, these values are not carried over.

Regards,
Mark


(Marcio) #3

Hi @mark-piller, those are essential values in order to make the App work properly, I waste a few hours debugging the App trying to find out in the code where’s the error. Is it a backend limitation, possible to be implemented or there is another way to backup our data with all default values, constraints, and validators? Regards


(Mark Piller) #4

If you use the “clone app” functionality, all the data and settings will be replicated in its entirety:


(Marcio) #5

@mark-piller, so what you’re trying to say is there are no way to export and import/restore a data table scheme as it is, right? Does backendless support ALTER TABLE queries to update those default values?

Something like this for example: https://tableplus.io/blog/2018/08/ms-sql-server-how-to-insert-a-column-with-default-value-to-existing-table.html


(Mark Piller) #6

Data import rules are described in the documentation:
https://backendless.com/docs/rest/mgmt_import.html

You can define schema and you can define data, however, additional properties such as default value, constraints, validators and security permissions are not described anywhere in the documentation for the reason that that functionality is not supported.

Regards,
Mark