0.9.4.sql 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. CREATE TABLE IF NOT EXISTS `trinitytv_devices` (
  2. `id` int(11) NOT NULL,
  3. `login` varchar(255) DEFAULT NULL,
  4. `subscriber_id` int(11) DEFAULT NULL,
  5. `mac` varchar(128) NOT NULL,
  6. `created_at` datetime DEFAULT NULL
  7. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  8. CREATE TABLE IF NOT EXISTS `trinitytv_subscribers` (
  9. `id` int(11) NOT NULL,
  10. `login` varchar(255) NOT NULL,
  11. `contracttrinity` bigint(20) DEFAULT NULL,
  12. `tariffid` int(11) NOT NULL,
  13. `actdate` datetime NOT NULL,
  14. `active` tinyint(1) NOT NULL DEFAULT '0'
  15. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  16. CREATE TABLE IF NOT EXISTS `trinitytv_suspend` (
  17. `id` int(11) NOT NULL,
  18. `login` varchar(255) NOT NULL
  19. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  20. CREATE TABLE IF NOT EXISTS `trinitytv_tariffs` (
  21. `id` int(11) NOT NULL,
  22. `name` varchar(255) NOT NULL,
  23. `fee` double DEFAULT '0',
  24. `serviceid` varchar(45) DEFAULT NULL
  25. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  26. ALTER TABLE `trinitytv_devices` ADD PRIMARY KEY (`id`);
  27. ALTER TABLE `trinitytv_subscribers` ADD PRIMARY KEY (`id`);
  28. ALTER TABLE `trinitytv_suspend` ADD PRIMARY KEY (`id`);
  29. ALTER TABLE `trinitytv_tariffs` ADD PRIMARY KEY (`id`);
  30. ALTER TABLE `trinitytv_devices` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  31. ALTER TABLE `trinitytv_subscribers` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  32. ALTER TABLE `trinitytv_suspend` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  33. ALTER TABLE `trinitytv_tariffs` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  34. ALTER TABLE `sms_history` MODIFY `msg_text` varchar(500) NOT NULL DEFAULT '';
  35. CREATE TABLE IF NOT EXISTS `pononuextusers` (
  36. `id` int(11) NOT NULL AUTO_INCREMENT,
  37. `onuid` int(11) NOT NULL,
  38. `login` VARCHAR(255) DEFAULT NULL,
  39. PRIMARY KEY (`id`)
  40. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
  41. ALTER TABLE `corp_persons` ADD COLUMN `notes` TEXT NULL AFTER `appointment`;