1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-30 10:42:41 +01:00
phorge-phorge/resources/sql/autopatches/20141005.phortuneproduct.sql
epriestley e9615b74a5 Move Phortune product logic into applications
Summary: Ref T2787. `Product` is currently a fairly heavy object, but as Phortune develops it makes a lot of sense to make it a lighter object and put more product logic in applications. Convert it into a fairly lightweight reference to applications. The idea is that Phortune is mostly providing a cart flow, and applications manage the details of products.

Test Plan: Funded an initiative for $1.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10634
2014-10-06 10:30:06 -07:00

22 lines
735 B
SQL

DROP TABLE {$NAMESPACE}_phortune.phortune_producttransaction;
ALTER TABLE {$NAMESPACE}_phortune.phortune_product
DROP productName;
ALTER TABLE {$NAMESPACE}_phortune.phortune_product
DROP priceAsCurrency;
ALTER TABLE {$NAMESPACE}_phortune.phortune_product
ADD productClassKey BINARY(12) NOT NULL;
ALTER TABLE {$NAMESPACE}_phortune.phortune_product
ADD productClass VARCHAR(128) NOT NULL COLLATE utf8_bin;
ALTER TABLE {$NAMESPACE}_phortune.phortune_product
ADD productRefKey BINARY(12) NOT NULL;
ALTER TABLE {$NAMESPACE}_phortune.phortune_product
ADD productRef VARCHAR(128) NOT NULL COLLATE utf8_bin;
ALTER TABLE {$NAMESPACE}_phortune.phortune_product
ADD UNIQUE KEY `key_product` (productClassKey, productRefKey);