Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
8 replies
Subscribers
9 subscribers
Views
3509 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Modify Type for a field in CDT as well as in MySQL
saileshd
over 8 years ago
I modified type of a field in CDT from int(11) to VARCHAR(255) and wanted to change the same in MySQL. But somehow I am not able to verify my Datasore. Can anyone direct me to best practices on this end?
OriginalPostID-231406
Discussion posts and replies are publicly visible
0
Omkar K
over 8 years ago
The CDT code would have been helpful to help you. From your question, I suppose that you have changed the columnDefinition in the cdt from int(11) to varchar(255). To verify datastore, you will have to update the table in the database with varchar(255) for that particular field and then try to verify the datastore. Also, make sure that the xsd:type is string. Please let me know if this helps.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ankushj
over 8 years ago
Since the column defination of data base table and cdt is different, it will not verify. Go to data base change column from int to varchar and try to verify from appian
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jagadeesh
Certified Senior Developer
over 8 years ago
if you are using the same column in any query entity , please make sure to update it as well
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Lonsdale
over 8 years ago
When you fail to verify the data store there will be a link stating 'more info'. Have a look at what this says
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
gaurava322
over 8 years ago
If the DB table has data in it, then following is the practice that should be made:
1) Create a backup table, copy all the data from the main table to backup table.
2) delete all records from the main table
3) alter the table column to varchar(255)
4) Now Insert all the data from backup table to main table.
5) Now go in Appian, under Data types, open the cdt corresponding to the table and hit "Create new version from XSD". Once this is updated, check outdated dependents.
You are all set.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jaishankarj
over 8 years ago
I will agree with gaurava322.
1. If there is no data in table you can:
Drop the table in MySql and then change the XSD of the CDT with proper annotation for the column and table name. Verify the entity and will create the table.
2. If there is data in table:
Create a temp table and move the data from the main table to it. Delete all the rows from the main table and alter the column definition. Move the data back from temp table and deop the temp table.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shivav142
over 8 years ago
Please refer the following link, it may helpful.
forum.appian.com/.../Custom_Data_Types.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
saileshd
over 8 years ago
Thanks everyone for responding so quickly. One of my other CDT was referencing the same Data field. It works now!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel