Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting forms and reuploading the same one resulted in error #39

Closed
arkhub opened this issue Dec 27, 2018 · 4 comments
Closed

Deleting forms and reuploading the same one resulted in error #39

arkhub opened this issue Dec 27, 2018 · 4 comments

Comments

@arkhub
Copy link

arkhub commented Dec 27, 2018

It shown errors that previous form already exist (although I've deleted it previously in odk central web) :

error-01

I only managed to reuploaded after changing the form_id, converted it to xml and re-upload it again.

@issa-tseng
Copy link
Member

as described in the message, this is intentional. you must change either the form id or the version in order to upload the same form again.

this is because if somebody has already downloaded the form to their mobile device before you deleted it from the server, and then you create a new different form with the same form id and version, then there is no way for the system to know that the form on the device is different than the form on the server when submissions to the form are uploaded, and data can get mixed and confused.

@arkhub
Copy link
Author

arkhub commented Dec 27, 2018

oh ok, that's make sense although I wish I can override it while still in development mode. Is it possible if i redownload the docker images or delete the specific data from the posgres db directly?

@issa-tseng
Copy link
Member

yeah—eventually if/when we have form preview on the central web panel itself, we may introduce some sort of draft state where you can replace over a form as many times as you'd like because it won't be visible for download onto mobile devices.

for right now, you can delete the data from postgres directly, yes: you can log into postgres with this command:

docker-compose exec postgres psql -U odk -W odk

and giving the password (by default also just odk). then you can cascading-delete the appropriate records from the forms table.

@arkhub
Copy link
Author

arkhub commented Dec 28, 2018

thanks, I've managed to delete the previous form now.

@arkhub arkhub closed this as completed Dec 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants