7.1-update.sql 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. SET NAMES utf8;
  2. SET time_zone = '+00:00';
  3. SET foreign_key_checks = 0;
  4. SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
  5. CREATE TABLE `{%TABLE_PREFIX%}users_statistics` (
  6. `id` INT(11) NOT NULL AUTO_INCREMENT,
  7. `user_id` INT(11) DEFAULT NULL,
  8. `remote_addr` VARCHAR(50) NOT NULL,
  9. `request_uri` VARCHAR(255) NOT NULL,
  10. `page_title` VARCHAR(255) NOT NULL,
  11. `http_user_agent` VARCHAR(255) NOT NULL,
  12. `http_accept_language` VARCHAR(50) NOT NULL,
  13. `http_referrer` VARCHAR(255) NOT NULL,
  14. `created_at` DATETIME NOT NULL,
  15. `updated_at` DATETIME DEFAULT NULL,
  16. PRIMARY KEY (`id`),
  17. KEY `user_id` (`user_id`),
  18. CONSTRAINT `{%TABLE_PREFIX%}users_statistics_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `{%TABLE_PREFIX%}users` (`id`)
  19. ON DELETE SET NULL
  20. )
  21. ENGINE =InnoDB
  22. DEFAULT CHARSET =utf8;
  23. ALTER TABLE `{%TABLE_PREFIX%}advertising`
  24. ADD `language` VARCHAR(255) NULL
  25. AFTER `nb_clicks`;
  26. ALTER TABLE `{%TABLE_PREFIX%}advertising`
  27. ADD `active` tinyint NOT NULL AFTER `language`;
  28. ALTER TABLE `{%TABLE_PREFIX%}transactions`
  29. CHANGE `name` `name` text COLLATE 'utf8_general_ci' NOT NULL AFTER `id`;