Database Issues Trying to Modify Tables

I am having problems when changing table structure.

I have a table called StageGroupRoster. I am trying to remove the GUID key field called StageGroupRosterKey, because it is causing me problems. I tried removing the index that points to that field, and it wouldn’t let me save the table because it had no primary key.

So I added enough fields to that index to be unique, and it took several tries before that change could be saved. When I tried to save the table, it says no primary key, couldn’t create temp table. It also said several times that the database was locked.

I was finally able to add the fields to the index and save the table. then I tried to remove the old GUID field from the index, and it will not save. Now the table is entirely missing from the list of tables.

This happened before on another table, and I finally got it back by closing Five, clearing browsing history in Chrome, then restarting Chrome and logging in as Control again.

But on this table, that doesn’t work. The table is missing now.

My database must be corrupted, because I can’t even export an FDF file. It just keeps thinking/spinning and then I get a blank error message.

Please help, I am now at a standstill on my development.

Please try to login directly as Control if that will help. If you no longer have credentials, please contact me via email and I will supply them. Also please contact me via email when you are going to log in to my account, so I can be out of the database.

Hi Ron,

I have sent an email to you.

Regards,

Elton S

I was trying to modify the table structure for 3 tables, beginning with the word Stage. I was trying to remove the guid key fields and create a new primary key. One table I was successful with. The other table, I believe it was StageGroupSchedule, I was partially successful making the changes but then the table just disappeared. I haven’t yet changed the other table. I believe it was StageMemberList.

The object was to remove the guid primary key and field and make the primary key just the needed fields. They are UserKey, RunKey, CreatedAt plus another identifying field. In the 2 group-related tables that is GroupName. In the member-related table, that would be SortName.

In any case, the database is now corrupted and I can’t export an fdf file.

I hope you can restore the missing table, but if you can’t I will recreate it.

Mainly, why does modifying table structure cause data corruption?

Thanks…

Hi Ron,

Thank you for the email and the further details.

I have checked your database schema, and the DB structure looks correct.

One possible reason you’re unable to download the application is that the Development database is quite large (over 300 MB, excluding the application itself).

Do you happen to know which table might be holding most of that data? If so, could you try cleaning up some or all of the records and then attempt to download the application again?

Regards,
Elton S

Hi Elton,

I still cannot export my application to an FDF file. I don’t know why the database is so huge. My biggest table, Members, has about 900 members. This shouldn’t be too big.

I think I once turned on logging and specified a leading or trailing table name character. Could this be causing such a huge database? I don’t remember where I set that, but if it is the cause, I can give up auditing and delete those tables.

They don’t show up in Data>Tables, so I don’t know how big they are or how to delete them. When you say “unable to download the application”, are you referring to making an fdf file?

Thanks…

UPDATE:

It turns out the huge database size was because of my history tables, which had grown very large over the last many months of development.

I turned off Versioning, and now the FDF file can be exported and is only about 17MB in size. Yay! Also, table structure changes save MUCH quicker than before.

Everything is now working as it should.

I would suggest an enhancement: If the FDF cannot be created, it would be very helpful if the message that popped up would actually tell us what was wrong. A blank message box doesn’t help anyone.

Otherwise, thanks so much for looking at this, and we can now consider it solved.

Hi Ron,

Thank you for letting me know you got a solution, and sorry for the delay in my response.

Indeed, the versioning table can hold a large amount of data, especially if your application has been under development for a while. So, any change will create a new record in the history table.

For future reference, as you asked before:
You can also clean a table’s records from the development by using the button ‘Create Table’: In Tables → Select a table record → click on the button ‘Create Table’.

What this button does is to recreate the selected table schema using the Five definition; it will also clean all the data from the table.

Regards,
Elton S