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

Upgrade 2.1.5 to 2.2: Upgrading fmDNS Schema failed #313

Closed
internethering opened this issue Apr 28, 2016 · 4 comments
Closed

Upgrade 2.1.5 to 2.2: Upgrading fmDNS Schema failed #313

internethering opened this issue Apr 28, 2016 · 4 comments

Comments

@internethering
Copy link

@internethering internethering commented Apr 28, 2016

to debug I switched on general_log of mariadb:

  1. problem: after failed once It will fail everytime at the to ALTER TABLE-Statements:
ALTER TABLE `fm_dns_acls` ADD `acl_parent_id` INT NOT NULL DEFAULT '0' AFTER `server_serial_no`

#1060 - Duplicate column name 'acl_parent_id'

I commented out the two ALTER TABLE statements, the error:

INSERT INTO `fm_dns_acls` (account_id, server_serial_no, acl_parent_id, acl_addresses, acl_status)
                        VALUES (1, 0, 2, '10/14', 'active')

#1364 - Field 'acl_name' doesn't have a default value

I changed SQL schema and set DEFAULT '' to acl_name. After that, the upgrade did his job.

@WillyXJ
Copy link
Owner

@WillyXJ WillyXJ commented Apr 28, 2016

Are you able to reproduce the first failure to find out why it occurred in the first place?

@internethering
Copy link
Author

@internethering internethering commented Apr 28, 2016

Yes:

  1. Step: 1st run of upgradefmDNS_220():
  • do /** Run queries */: this runs the ALTER TABLE statements & db got changed
  • do /** Rework ACL table */: failed because of #1364 - Field 'acl_name' doesn't have a default value
  1. Step: try to run database upgrade again, 2nd run of upgradefmDNS_220():
  • do /** Run queries */: database got changed at 1st run, so it failes now at this point. You should catch the 1060-error and ignore it ;)

@WillyXJ
Copy link
Owner

@WillyXJ WillyXJ commented Apr 29, 2016

Confirmed bug when migrating the ACLs to the new schema. I'd recommend rolling back to 2.1.5 until a fix is released as your ACLs likely did not carry over properly.

WillyXJ pushed a commit that referenced this issue Apr 29, 2016
@WillyXJ
Copy link
Owner

@WillyXJ WillyXJ commented Apr 29, 2016

This is fixed in v2.2.1.

@WillyXJ WillyXJ closed this Apr 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants