Tooba Atif
Posts: 0
Joined: Fri Apr 04, 2014 3:07 am

How can I change the position of DB collection column? and add auto increment data?

I have imported a collection from a CSV file and I want to add a new column which is indexed and should be the first column of DB. How can I do this? and I have to change some other column positions as well.
Also please let me know how can I insert the data for all 800 rows? lets say the data would be incrementing column numbers as ID of tables.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How can I change the position of DB collection column? and add auto increment data?

Hi Atif.

Sorry but there is no ability to change order of the columns from the ui.

You can export DB to json or csv file, edit it after, and then import it to your DB.

Also there is no ability to set autoincrement field. As a workaround you can create a service that reads maximum field value, and then increment it before writing the next value to Database.

What about 800 rows - you can insert them with import collection or with server code.

See details here: http://docs.appery.io/documentation/b...

Regards.

Tooba Atif
Posts: 0
Joined: Fri Apr 04, 2014 3:07 am

How can I change the position of DB collection column? and add auto increment data?

Thanks Yurii.
Please add this feature in your future versions. It would be very helpful.
I have another DB collection of like 4000 records I cant update it manually by exporting to csv and then adding the new column and manually writing ID's and flags for all these records and then importing again.
Let me figure out something else.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

How can I change the position of DB collection column? and add auto increment data?

Hello,

As workaround you can add one more column for sorting. E.g. write 1 for first item, 2 - for second, etc.

Tooba Atif
Posts: 0
Joined: Fri Apr 04, 2014 3:07 am

How can I change the position of DB collection column? and add auto increment data?

This would take a lot of time for more data as my client has all the data in csv files and they are very large files having 25 to 50 columns and thousands of rows.

Tooba Atif
Posts: 0
Joined: Fri Apr 04, 2014 3:07 am

How can I change the position of DB collection column? and add auto increment data?

Thanks Sergiy..
I have used different options for my tables one was http://office.microsoft.com/en-au/exc...

and a few others that solved the issue :)
Thanks for your help!

Alex Van Name
Posts: 0
Joined: Mon Jun 30, 2014 7:36 pm

How can I change the position of DB collection column? and add auto increment data?

Image

I used this just now and it worked great, just export this as a windows csv

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How can I change the position of DB collection column? and add auto increment data?

Hi Alex,

Thanks for your update.

Regards.

Alex Van Name
Posts: 0
Joined: Mon Jun 30, 2014 7:36 pm

How can I change the position of DB collection column? and add auto increment data?

You're welcome! I will give back if I discover something helpful.

Return to “Issues”