changing a datatype
In adobe campaign classic v7, in a schema, if I change the datatype of an attribute like integer to string, what is going to happen to the existing data?
In adobe campaign classic v7, in a schema, if I change the datatype of an attribute like integer to string, what is going to happen to the existing data?
Hi @rbiri ,
When you change the datatype of an attribute, you have to update the database structure. While doing this, you can notice in SQL statement that the existing old data type column will get dropped and a new field will get created in the table with new datatype, with the same internal name.
ALTER TABLE SchemaName
ADD COLUMN sMyColumn VARCHAR(255);
ANALYZE SchemaName;
ALTER TABLE SchemaName
DROP COLUMN iMyColumn;
So while dropping the old data type column, all the data will also get deleted along with the field. And a new field will get created with the new data type and data will be empty for this field.
To save the data, you can export the data to a CSV file and after changing the data type and updating the database structure, import the file using import workflow and update the records into the schema.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.