Wir suchen neue Team-Mitglieder für Systemadministration und Office Management. Interesse? Klick für mehr Infos!
pretix

Release 1.7.1 of pretix

5. Sept. 2017

If you already upgraded to today's release 1.7.0, you might have run into the following error on MySQL:

django.db.utils.OperationalError: (1072, "Key column 'payment_fee_tax_rule_id' doesn't exist in table")

Or on PostgreSQL:

psycopg2.ProgrammingError: column "payment_fee_tax_rule_id" does not exist

On PostgreSQL

On PostgreSQL, you can just upgrade to version 1.7.1 directly and run migrations like you normally would.

On MysQL

On MySQL, if you created a backup before the upgrade, please revert to it and upgrade to 1.7.1 directly. If you do not have a current backup, please proceed with the following steps:

First, create a full backup of your database. Then, upgrade to pretix 1.7.1 without running migrations.

Now execute the following command:

python3 -m pretix migrate --fake pretixbase 0077_auto_20170829_1126

And the following SQL commands on your database:

ALTER TABLE `pretixbase_taxrule`
    ADD CONSTRAINT `pretixbase_taxrule_event_id_178a74ee_fk_pretixbase_event_id`
    FOREIGN KEY (`event_id`) REFERENCES `pretixbase_event` (`id`);
ALTER TABLE `pretixbase_item`
    ADD CONSTRAINT `pretixbase_item_tax_rule_id_f501b784_fk_pretixbase_taxrule_id`
    FOREIGN KEY (`tax_rule_id`) REFERENCES `pretixbase_taxrule` (`id`);
ALTER TABLE `pretixbase_orderposition`
    ADD CONSTRAINT `pretixbase_orderposi_tax_rule_id_6564b2f1_fk_pretixbas`
    FOREIGN KEY (`tax_rule_id`) REFERENCES `pretixbase_taxrule` (`id`);
ALTER TABLE `pretixbase_eventmetaproperty`
    ADD CONSTRAINT `pretixbase_eventmeta_organizer_id_595552fd_fk_pretixbas`
    FOREIGN KEY (`organizer_id`) REFERENCES `pretixbase_organizer` (`id`);
CREATE INDEX `pretixbase_eventmetaproperty_name_c3ddda49`
    ON `pretixbase_eventmetaproperty` (`name`);
ALTER TABLE `pretixbase_eventmetavalue`
    ADD CONSTRAINT `pretixbase_eventmeta_event_id_567f5820_fk_pretixbas`
    FOREIGN KEY (`event_id`) REFERENCES `pretixbase_event` (`id`);
ALTER TABLE `pretixbase_eventmetavalue`
    ADD CONSTRAINT `pretixbase_eventmeta_property_id_28f8ebf7_fk_pretixbas`
    FOREIGN KEY (`property_id`) REFERENCES `pretixbase_eventmetaproperty` (`id`);
ALTER TABLE `pretixbase_subeventmetavalue`
    ADD CONSTRAINT `pretixbase_subeventm_property_id_bda97d56_fk_pretixbas`
    FOREIGN KEY (`property_id`) REFERENCES `pretixbase_eventmetaproperty` (`id`);
ALTER TABLE `pretixbase_subeventmetavalue`
    ADD CONSTRAINT `pretixbase_subeventm_subevent_id_b97a87d2_fk_pretixbas`
    FOREIGN KEY (`subevent_id`) REFERENCES `pretixbase_subevent` (`id`);
ALTER TABLE `pretixbase_orderfee`
    ADD CONSTRAINT `pretixbase_orderfee_order_id_b8c4a186_fk_pretixbase_order_id`
    FOREIGN KEY (`order_id`) REFERENCES `pretixbase_order` (`id`);
ALTER TABLE `pretixbase_orderfee`
    ADD CONSTRAINT `pretixbase_orderfee_tax_rule_id_082755a4_fk_pretixbas`
    FOREIGN KEY (`tax_rule_id`) REFERENCES `pretixbase_taxrule` (`id`);

You can then complete upgrade to 1.7.1.

We are sorry for any inconvenience caused by this.

Raphael Michel

Raphael ist der Gründer und Haupt-Entwickler von pretix. Er begeistert sich für benutzerfreundliche, elegante Software und wenn er nicht zu beschäftigt mit pretix ist, organisiert er gerne selbst Konferenzen mit.

Mehr Blog-Posts lesen

Noch Fragen?
+49 6221 32177-50 Mo-Fr 09:00-17:00 Uhr