diff --git a/install-dev/sql/db.sql b/install-dev/sql/db.sql index 57e1ff988..6a6ae5904 100644 --- a/install-dev/sql/db.sql +++ b/install-dev/sql/db.sql @@ -1259,17 +1259,20 @@ CREATE TABLE `PREFIX_product_attribute_image` ( ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; CREATE TABLE `PREFIX_product_download` ( - `id_product_download` int(10) unsigned NOT NULL auto_increment, + `id_product_download` int(10) unsigned NOT NULL AUTO_INCREMENT, `id_product` int(10) unsigned NOT NULL, - `display_filename` varchar(255) default NULL, - `physically_filename` varchar(255) default NULL, - `date_deposit` datetime NOT NULL, - `date_expiration` datetime default NULL, - `nb_days_accessible` int(10) unsigned default NULL, - `nb_downloadable` int(10) unsigned default '1', - `active` tinyint(1) unsigned NOT NULL default '1', - PRIMARY KEY (`id_product_download`), - KEY `product_active` (`id_product`,`active`) + `id_product_attribute` int(10) unsigned NOT NULL, + `display_filename` varchar(255) DEFAULT NULL, + `filename` varchar(255) DEFAULT NULL, + `date_add` datetime NOT NULL, + `date_expiration` datetime DEFAULT NULL, + `nb_days_accessible` int(10) unsigned DEFAULT NULL, + `nb_downloadable` int(10) unsigned DEFAULT '1', + `active` tinyint(1) unsigned NOT NULL DEFAULT '1', + `is_shareable` tinyint(1) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id_product_download`), + KEY `product_active` (`id_product`,`active`), + KEY `id_product_attribute` (`id_product_attribute`) ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; CREATE TABLE `PREFIX_product_lang` ( diff --git a/install-dev/sql/upgrade/1.5.0.1.sql b/install-dev/sql/upgrade/1.5.0.1.sql index 08379588c..0b8b97cdd 100644 --- a/install-dev/sql/upgrade/1.5.0.1.sql +++ b/install-dev/sql/upgrade/1.5.0.1.sql @@ -142,3 +142,8 @@ ALTER TABLE `PREFIX_customer_message` ADD `private` TINYINT NOT NULL DEFAULT ALTER TABLE `PREFIX_attribute` ADD `position` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'; /* PHP:add_attribute_position(); */; + +ALTER TABLE `PREFIX_product_download` CHANGE `date_deposit` `date_add` DATETIME NOT NULL ; +ALTER TABLE `PREFIX_product_download` CHANGE `physically_filename` `filename` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL; +ALTER TABLE `PREFIX_product_download` ADD `id_product_attribute` INT( 10 ) UNSIGNED NOT NULL AFTER `id_product` , ADD INDEX ( `id_product_attribute` ); +ALTER TABLE `PREFIX_product_download` ADD `is_shareable` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `active` \ No newline at end of file