siteadm_tables.sql 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922
  1. -- phpMyAdmin SQL Dump
  2. -- version 3.3.7
  3. -- http://www.phpmyadmin.net
  4. --
  5. -- Serveur: localhost
  6. -- Généré le : Ven 20 Avril 2012 à 21:19
  7. -- Version du serveur: 5.1.61
  8. -- Version de PHP: 5.3.6-13ubuntu3.6
  9. SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
  10. --
  11. -- Base de données: `siteadm`
  12. --
  13. CREATE DATABASE IF NOT EXISTS siteadm;
  14. USE `siteadm`;
  15. -- --------------------------------------------------------
  16. --
  17. -- Structure de la table `account`
  18. --
  19. CREATE TABLE IF NOT EXISTS `account` (
  20. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  21. `_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  22. `actif` tinyint(1) NOT NULL DEFAULT '1',
  23. `manager_id` int(10) unsigned DEFAULT NULL,
  24. `type` enum('user','manager','admin') NOT NULL DEFAULT 'user',
  25. `offre_id` int(10) unsigned DEFAULT NULL,
  26. `offre_expire` date DEFAULT NULL,
  27. `folder` varchar(32) NOT NULL,
  28. `name` varchar(32) NOT NULL,
  29. `password` varchar(16) NOT NULL,
  30. `password_md5` varchar(64) NOT NULL,
  31. `email` varchar(128) NOT NULL,
  32. `civilite` enum('m','mme','mlle') DEFAULT NULL,
  33. `prenom` varchar(64) NOT NULL,
  34. `nom` varchar(64) NOT NULL,
  35. `societe` varchar(128) DEFAULT NULL,
  36. `disk_quota_soft` int(10) unsigned DEFAULT NULL,
  37. `disk_quota_hard` int(10) unsigned DEFAULT NULL,
  38. PRIMARY KEY (`id`),
  39. UNIQUE KEY `name` (`name`),
  40. KEY `manager_id` (`manager_id`),
  41. KEY `offre_id` (`offre_id`)
  42. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  43. -- --------------------------------------------------------
  44. --
  45. -- Structure de la table `account_language_bin_ref`
  46. --
  47. CREATE TABLE IF NOT EXISTS `account_language_bin_ref` (
  48. `account_id` int(10) unsigned NOT NULL,
  49. `language_bin_id` int(10) unsigned NOT NULL,
  50. PRIMARY KEY (`account_id`,`language_bin_id`),
  51. KEY `language_bin_id` (`language_bin_id`)
  52. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  53. -- --------------------------------------------------------
  54. --
  55. -- Structure de la table `account_log`
  56. --
  57. CREATE TABLE IF NOT EXISTS `account_log` (
  58. `datetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  59. `account_id` int(10) unsigned DEFAULT NULL,
  60. `operation` enum('connect_ok','connect_error') DEFAULT NULL,
  61. `ip` varchar(16) NOT NULL,
  62. `details` text NOT NULL,
  63. KEY `datetime` (`datetime`),
  64. KEY `account_id` (`account_id`),
  65. KEY `ip` (`ip`),
  66. KEY `operation` (`operation`)
  67. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  68. -- --------------------------------------------------------
  69. --
  70. -- Structure de la table `account_php_ext_ref`
  71. --
  72. CREATE TABLE IF NOT EXISTS `account_php_ext_ref` (
  73. `account_id` int(10) unsigned NOT NULL,
  74. `phpext_id` tinyint(3) unsigned NOT NULL,
  75. PRIMARY KEY (`account_id`,`phpext_id`),
  76. KEY `phpext_id` (`phpext_id`)
  77. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  78. -- --------------------------------------------------------
  79. --
  80. -- Structure de la table `db`
  81. --
  82. CREATE TABLE IF NOT EXISTS `db` (
  83. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  84. `_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  85. `account_id` int(10) unsigned DEFAULT NULL,
  86. `dbname` varchar(32) NOT NULL,
  87. `username` varchar(32) NOT NULL,
  88. `password` varchar(16) NOT NULL,
  89. `quota` enum('10','100','1000','10000') NOT NULL DEFAULT '100',
  90. `max_user_connections` int(10) unsigned NOT NULL DEFAULT '10',
  91. `max_queries` int(10) unsigned NOT NULL DEFAULT '1000',
  92. `max_connections` int(10) unsigned NOT NULL DEFAULT '1000',
  93. `max_updates` int(10) unsigned NOT NULL DEFAULT '1000',
  94. PRIMARY KEY (`id`),
  95. UNIQUE KEY `name` (`dbname`),
  96. KEY `account` (`account_id`,`dbname`)
  97. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  98. -- --------------------------------------------------------
  99. --
  100. -- Structure de la table `domain`
  101. --
  102. CREATE TABLE IF NOT EXISTS `domain` (
  103. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  104. `_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  105. `account_id` int(10) unsigned DEFAULT NULL,
  106. `name` varchar(128) NOT NULL,
  107. `email_actif` tinyint(1) NOT NULL DEFAULT '1',
  108. `creation_date` date DEFAULT NULL,
  109. `renew_date` date DEFAULT NULL,
  110. PRIMARY KEY (`id`),
  111. UNIQUE KEY `name` (`name`),
  112. KEY `account_id` (`account_id`)
  113. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  114. -- --------------------------------------------------------
  115. --
  116. -- Structure de la table `domain_bind`
  117. --
  118. CREATE TABLE IF NOT EXISTS `domain_bind` (
  119. `domain_id` int(10) unsigned NOT NULL,
  120. `type` varchar(64) NOT NULL,
  121. KEY `domain_id` (`domain_id`,`type`)
  122. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  123. -- --------------------------------------------------------
  124. --
  125. -- Doublure de structure pour la vue `dovecot_email`
  126. --
  127. CREATE TABLE IF NOT EXISTS `dovecot_email` (
  128. `account_id` decimal(10,0)
  129. ,`account_name` varchar(32)
  130. ,`actif` int(1)
  131. ,`email_name` varchar(64)
  132. ,`domain_name` varchar(128)
  133. ,`email` varchar(193)
  134. ,`password` varchar(32)
  135. ,`uid` decimal(11,0)
  136. ,`gid` decimal(11,0)
  137. ,`home` varchar(246)
  138. ,`mail` varchar(254)
  139. );
  140. -- --------------------------------------------------------
  141. --
  142. -- Structure de la table `email`
  143. --
  144. CREATE TABLE IF NOT EXISTS `email` (
  145. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  146. `_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  147. `actif` enum('0','1') NOT NULL DEFAULT '1',
  148. `account_id` int(10) unsigned DEFAULT NULL,
  149. `name` varchar(64) NOT NULL,
  150. `domain_id` int(10) unsigned NOT NULL,
  151. `password` varchar(64) NOT NULL,
  152. `quota` enum('10','100','1000','10000') NOT NULL DEFAULT '100',
  153. PRIMARY KEY (`id`),
  154. UNIQUE KEY `domain_id` (`domain_id`,`name`),
  155. KEY `account_id` (`account_id`)
  156. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  157. -- --------------------------------------------------------
  158. --
  159. -- Structure de la table `email_alias`
  160. --
  161. CREATE TABLE IF NOT EXISTS `email_alias` (
  162. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  163. `_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  164. `name` varchar(64) NOT NULL,
  165. `domain_id` int(10) unsigned DEFAULT NULL,
  166. `email_id` int(10) unsigned DEFAULT NULL,
  167. `redirect_email` varchar(128) DEFAULT NULL,
  168. `actif` tinyint(1) NOT NULL DEFAULT '1',
  169. `account_id` int(10) unsigned DEFAULT NULL,
  170. PRIMARY KEY (`id`),
  171. KEY `domain_id` (`domain_id`,`name`),
  172. KEY `account_id` (`account_id`),
  173. KEY `email_id` (`email_id`)
  174. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  175. -- --------------------------------------------------------
  176. --
  177. -- Structure de la table `email_sync`
  178. --
  179. CREATE TABLE IF NOT EXISTS `email_sync` (
  180. `email_id` int(10) unsigned NOT NULL,
  181. `hostname` varchar(128) NOT NULL,
  182. `username` varchar(128) NOT NULL,
  183. `password` varchar(16) NOT NULL,
  184. KEY `email_id` (`email_id`)
  185. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  186. -- --------------------------------------------------------
  187. --
  188. -- Structure de la table `ftp_group`
  189. --
  190. CREATE TABLE IF NOT EXISTS `ftp_group` (
  191. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  192. `groupname` varchar(16) NOT NULL,
  193. `gid` int(10) unsigned NOT NULL,
  194. `members` text NOT NULL,
  195. PRIMARY KEY (`id`),
  196. UNIQUE KEY `groupname` (`groupname`)
  197. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  198. -- --------------------------------------------------------
  199. --
  200. -- Structure de la table `ftp_user`
  201. --
  202. CREATE TABLE IF NOT EXISTS `ftp_user` (
  203. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  204. `actif` tinyint(1) NOT NULL DEFAULT '1',
  205. `account_id` int(10) unsigned NOT NULL,
  206. `username` varchar(64) NOT NULL,
  207. `password` varchar(64) NOT NULL,
  208. `type` enum('private','public') NOT NULL DEFAULT 'public',
  209. `folder` varchar(128) NOT NULL,
  210. PRIMARY KEY (`id`),
  211. UNIQUE KEY `account_id` (`account_id`,`username`)
  212. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  213. -- --------------------------------------------------------
  214. --
  215. -- Structure de la table `install_bin`
  216. --
  217. CREATE TABLE IF NOT EXISTS `install_bin` (
  218. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  219. `package_id` int(10) unsigned DEFAULT NULL,
  220. `name` varchar(64) NOT NULL,
  221. PRIMARY KEY (`id`),
  222. KEY `package_id` (`package_id`)
  223. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  224. -- --------------------------------------------------------
  225. --
  226. -- Structure de la table `install_packages`
  227. --
  228. CREATE TABLE IF NOT EXISTS `install_packages` (
  229. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  230. `name` varchar(64) NOT NULL,
  231. `script` text,
  232. PRIMARY KEY (`id`),
  233. UNIQUE KEY `name` (`name`)
  234. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  235. -- --------------------------------------------------------
  236. --
  237. -- Structure de la table `language`
  238. --
  239. CREATE TABLE IF NOT EXISTS `language` (
  240. `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
  241. `name` varchar(64) NOT NULL,
  242. `content_type` varchar(64) NOT NULL,
  243. `extension_list` varchar(64) NOT NULL,
  244. PRIMARY KEY (`id`)
  245. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  246. -- --------------------------------------------------------
  247. --
  248. -- Structure de la table `language_bin`
  249. --
  250. CREATE TABLE IF NOT EXISTS `language_bin` (
  251. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  252. `language_id` tinyint(3) unsigned NOT NULL,
  253. `app_compatible` tinyint(1) NOT NULL DEFAULT '0',
  254. `version` varchar(16) NOT NULL,
  255. `CGI_type` varchar(16) NOT NULL,
  256. `options` varchar(64) NOT NULL,
  257. `prefix` varchar(64) NOT NULL,
  258. `exec_bin` varchar(64) NOT NULL,
  259. `extension_dir` varchar(256) NOT NULL,
  260. PRIMARY KEY (`id`),
  261. KEY `language_id` (`language_id`)
  262. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  263. -- --------------------------------------------------------
  264. --
  265. -- Structure de la table `language_bin_php_ext_ref`
  266. --
  267. CREATE TABLE IF NOT EXISTS `language_bin_php_ext_ref` (
  268. `language_bin_id` int(10) unsigned NOT NULL,
  269. `ext_id` tinyint(3) unsigned NOT NULL,
  270. PRIMARY KEY (`language_bin_id`,`ext_id`),
  271. KEY `ext_id` (`ext_id`)
  272. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  273. -- --------------------------------------------------------
  274. --
  275. -- Structure de la table `language_compile_options`
  276. --
  277. CREATE TABLE IF NOT EXISTS `language_compile_options` (
  278. `language_id` tinyint(3) unsigned NOT NULL,
  279. `cat` enum('misc','php','sapi') NOT NULL DEFAULT 'sapi',
  280. `name` varchar(64) NOT NULL,
  281. `type` enum('with','enable') NOT NULL,
  282. `value` varchar(32) DEFAULT NULL,
  283. `desc` text NOT NULL,
  284. PRIMARY KEY (`language_id`,`name`)
  285. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  286. -- --------------------------------------------------------
  287. --
  288. -- Structure de la table `language_php_ext`
  289. --
  290. CREATE TABLE IF NOT EXISTS `language_php_ext` (
  291. `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
  292. `name` varchar(64) NOT NULL,
  293. `type` enum('extension','pear','pecl') NOT NULL DEFAULT 'extension',
  294. `package` varchar(64) NOT NULL,
  295. `description` varchar(256) NOT NULL,
  296. PRIMARY KEY (`id`),
  297. KEY `description` (`description`(255))
  298. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  299. -- --------------------------------------------------------
  300. --
  301. -- Structure de la table `language_php_functions`
  302. --
  303. CREATE TABLE IF NOT EXISTS `language_php_functions` (
  304. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  305. `name` varchar(64) NOT NULL,
  306. `security` enum('proc','basedir','filesystem','info','perf') NOT NULL,
  307. `description` text NOT NULL,
  308. PRIMARY KEY (`id`),
  309. UNIQUE KEY `name` (`name`),
  310. KEY `security` (`security`,`name`)
  311. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  312. -- --------------------------------------------------------
  313. --
  314. -- Structure de la table `mysql`
  315. --
  316. CREATE TABLE IF NOT EXISTS `mysql` (
  317. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  318. `_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  319. `account_id` int(10) unsigned DEFAULT NULL,
  320. `name` varchar(64) NOT NULL,
  321. `password` varchar(16) NOT NULL,
  322. `max_user_connections` int(10) unsigned DEFAULT '10',
  323. `max_queries` int(10) unsigned DEFAULT '1000',
  324. `max_connections` int(10) unsigned DEFAULT '1000',
  325. `max_updates` int(10) unsigned DEFAULT '1000',
  326. PRIMARY KEY (`id`),
  327. UNIQUE KEY `name` (`name`),
  328. KEY `account_id` (`account_id`)
  329. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  330. -- --------------------------------------------------------
  331. --
  332. -- Structure de la table `offre`
  333. --
  334. CREATE TABLE IF NOT EXISTS `offre` (
  335. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  336. `name` varchar(64) NOT NULL,
  337. `description` text NOT NULL,
  338. `tarif` decimal(10,2) unsigned DEFAULT NULL,
  339. `disk_quota_soft` int(10) unsigned DEFAULT NULL,
  340. `disk_quota_hard` int(10) unsigned DEFAULT NULL,
  341. `worker_max` tinyint(3) unsigned DEFAULT NULL,
  342. `worker_ram_max` int(10) unsigned DEFAULT NULL,
  343. `mysql_db_max` tinyint(3) unsigned DEFAULT NULL,
  344. `domain_nb_max` tinyint(3) unsigned DEFAULT NULL,
  345. `website_nb_max` int(10) unsigned DEFAULT NULL,
  346. PRIMARY KEY (`id`)
  347. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  348. -- --------------------------------------------------------
  349. --
  350. -- Structure de la table `phpapp`
  351. --
  352. CREATE TABLE IF NOT EXISTS `phpapp` (
  353. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  354. `_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  355. `actif` tinyint(1) NOT NULL DEFAULT '1',
  356. `account_id` int(10) unsigned DEFAULT NULL,
  357. `name` varchar(128) NOT NULL,
  358. `language_bin_id` int(10) unsigned NOT NULL,
  359. `description` text NOT NULL,
  360. `webmaster_email` varchar(128) DEFAULT NULL,
  361. `apc_shm_size` int(3) unsigned NOT NULL DEFAULT '16',
  362. PRIMARY KEY (`id`),
  363. UNIQUE KEY `domain_id_2` (`account_id`,`name`),
  364. KEY `language_bin_id` (`language_bin_id`)
  365. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  366. -- --------------------------------------------------------
  367. --
  368. -- Structure de la table `phpapp_ext_ref`
  369. --
  370. CREATE TABLE IF NOT EXISTS `phpapp_ext_ref` (
  371. `phpapp_id` int(10) unsigned NOT NULL,
  372. `ext_id` tinyint(3) unsigned NOT NULL,
  373. PRIMARY KEY (`phpapp_id`,`ext_id`),
  374. KEY `ext_id` (`ext_id`)
  375. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  376. -- --------------------------------------------------------
  377. --
  378. -- Structure de la table `phppool`
  379. --
  380. CREATE TABLE IF NOT EXISTS `phppool` (
  381. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  382. `_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  383. `actif` tinyint(1) NOT NULL DEFAULT '1',
  384. `account_id` int(10) unsigned DEFAULT NULL,
  385. `system_user` varchar(32) DEFAULT NULL,
  386. `system_group` varchar(32) DEFAULT NULL,
  387. `phpapp_id` int(10) unsigned DEFAULT NULL,
  388. `language_bin_id` int(10) unsigned DEFAULT NULL,
  389. `name` varchar(32) NOT NULL,
  390. `description` text NOT NULL,
  391. `webmaster_email` varchar(128) DEFAULT NULL,
  392. `worker_nb_max` tinyint(4) NOT NULL DEFAULT '1',
  393. `worker_max_requests` int(10) unsigned NOT NULL DEFAULT '5000',
  394. `error_display` tinyint(1) NOT NULL DEFAULT '0',
  395. `error_filesave` tinyint(1) NOT NULL DEFAULT '1',
  396. `max_execution_time` tinyint(3) unsigned NOT NULL DEFAULT '30',
  397. `max_input_time` tinyint(3) unsigned NOT NULL DEFAULT '60',
  398. `memory_limit` tinyint(3) unsigned NOT NULL DEFAULT '64',
  399. `post_max_size` tinyint(3) unsigned NOT NULL DEFAULT '8',
  400. `file_uploads` tinyint(1) NOT NULL DEFAULT '1',
  401. `upload_max_filesize` tinyint(3) unsigned NOT NULL DEFAULT '2',
  402. `max_file_upload` tinyint(2) unsigned NOT NULL DEFAULT '5',
  403. `error_reporting` varchar(64) NOT NULL DEFAULT 'E_ALL & ~E_DEPRECATED',
  404. `include_path` text,
  405. `open_basedir` text,
  406. `short_open_tag` tinyint(1) NOT NULL DEFAULT '0',
  407. `apc_stat` tinyint(1) NOT NULL,
  408. `apc_lazy` tinyint(1) NOT NULL,
  409. PRIMARY KEY (`id`),
  410. UNIQUE KEY `domain_id_2` (`account_id`,`name`),
  411. KEY `language_bin_id` (`language_bin_id`),
  412. KEY `phpapp_id` (`phpapp_id`)
  413. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  414. -- --------------------------------------------------------
  415. --
  416. -- Structure de la table `phppool_disable_functions_ref`
  417. --
  418. CREATE TABLE IF NOT EXISTS `phppool_disable_functions_ref` (
  419. `phppool_id` int(10) unsigned NOT NULL,
  420. `function_id` int(10) unsigned NOT NULL,
  421. PRIMARY KEY (`phppool_id`,`function_id`),
  422. KEY `function_id` (`function_id`)
  423. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  424. -- --------------------------------------------------------
  425. --
  426. -- Structure de la table `phppool_ext_ref`
  427. --
  428. CREATE TABLE IF NOT EXISTS `phppool_ext_ref` (
  429. `phppool_id` int(10) unsigned NOT NULL,
  430. `ext_id` tinyint(3) unsigned NOT NULL,
  431. PRIMARY KEY (`phppool_id`,`ext_id`),
  432. KEY `ext_id` (`ext_id`)
  433. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  434. -- --------------------------------------------------------
  435. --
  436. -- Doublure de structure pour la vue `postfix_alias`
  437. --
  438. CREATE TABLE IF NOT EXISTS `postfix_alias` (
  439. `account_id` decimal(10,0)
  440. ,`account_name` varchar(32)
  441. ,`destination` varchar(193)
  442. ,`origine` varchar(193)
  443. ,`actif` int(1)
  444. );
  445. -- --------------------------------------------------------
  446. --
  447. -- Doublure de structure pour la vue `postfix_domain`
  448. --
  449. CREATE TABLE IF NOT EXISTS `postfix_domain` (
  450. `account_id` decimal(10,0)
  451. ,`account_name` varchar(32)
  452. ,`name` varchar(128)
  453. ,`actif` int(1)
  454. );
  455. -- --------------------------------------------------------
  456. --
  457. -- Doublure de structure pour la vue `postfix_mbox`
  458. --
  459. CREATE TABLE IF NOT EXISTS `postfix_mbox` (
  460. `account_id` decimal(10,0)
  461. ,`account_name` varchar(32)
  462. ,`uid` decimal(11,0)
  463. ,`gid` decimal(11,0)
  464. ,`email` varchar(193)
  465. ,`maildir` varchar(232)
  466. ,`actif` int(1)
  467. );
  468. -- --------------------------------------------------------
  469. --
  470. -- Doublure de structure pour la vue `postfix_redirect`
  471. --
  472. CREATE TABLE IF NOT EXISTS `postfix_redirect` (
  473. `account_id` decimal(10,0)
  474. ,`account_name` varchar(32)
  475. ,`destination` varchar(128)
  476. ,`origine` varchar(193)
  477. ,`actif` int(1)
  478. );
  479. -- --------------------------------------------------------
  480. --
  481. -- Doublure de structure pour la vue `proftpd_user`
  482. --
  483. CREATE TABLE IF NOT EXISTS `proftpd_user` (
  484. `account_id` decimal(10,0)
  485. ,`actif` int(1)
  486. ,`id` int(10) unsigned
  487. ,`username` varchar(97)
  488. ,`password` varbinary(13)
  489. ,`uid` decimal(11,0)
  490. ,`gid` decimal(11,0)
  491. ,`folder` varchar(183)
  492. ,`shell` varchar(9)
  493. );
  494. -- --------------------------------------------------------
  495. --
  496. -- Structure de la table `webapp`
  497. --
  498. CREATE TABLE IF NOT EXISTS `webapp` (
  499. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  500. `_update` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  501. `name` varchar(64) NOT NULL,
  502. `version` varchar(16) NOT NULL,
  503. `description` text NOT NULL,
  504. `folder_alias` text,
  505. `php_include_folder` varchar(128) DEFAULT NULL,
  506. `php_open_basedir` varchar(128) DEFAULT NULL,
  507. `php_short_open_tag` tinyint(1) DEFAULT NULL,
  508. PRIMARY KEY (`id`),
  509. UNIQUE KEY `name` (`name`,`version`)
  510. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  511. -- --------------------------------------------------------
  512. --
  513. -- Structure de la table `website`
  514. --
  515. CREATE TABLE IF NOT EXISTS `website` (
  516. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  517. `_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  518. `actif` tinyint(1) NOT NULL DEFAULT '1',
  519. `account_id` int(10) unsigned DEFAULT NULL,
  520. `folder` varchar(64) NOT NULL,
  521. `domain_id` int(10) unsigned NOT NULL,
  522. `name` varchar(128) NOT NULL,
  523. `webapp_id` int(10) unsigned DEFAULT NULL,
  524. `phppool_id` int(10) unsigned DEFAULT NULL,
  525. `webmaster_email` varchar(128) NOT NULL,
  526. `index_files` varchar(64) NOT NULL DEFAULT 'index.php index.html',
  527. `charset_default` enum('utf-8','iso-8859-1') DEFAULT 'utf-8',
  528. `folder_auth` tinyint(1) NOT NULL DEFAULT '0',
  529. `ssl` tinyint(1) NOT NULL DEFAULT '1',
  530. `ssl_force_redirect` tinyint(1) NOT NULL DEFAULT '0',
  531. `php_engine` tinyint(1) DEFAULT '1',
  532. `php_expose` enum('On','Off') DEFAULT 'Off',
  533. `php_short_open_tag` tinyint(1) DEFAULT NULL,
  534. `php_max_execution_time` tinyint(3) unsigned DEFAULT '30',
  535. `php_max_input_time` tinyint(3) unsigned DEFAULT '60',
  536. `php_memory_limit` tinyint(3) unsigned DEFAULT '32',
  537. `php_post_max_size` tinyint(3) unsigned DEFAULT '8',
  538. `php_file_uploads` enum('On','Off') DEFAULT 'On',
  539. `php_upload_max_filesize` tinyint(3) unsigned DEFAULT '2',
  540. `php_max_file_upload` tinyint(2) unsigned DEFAULT '5',
  541. `php_error_reporting` varchar(64) DEFAULT 'E_ALL & ~E_DEPRECATED',
  542. `php_enable_dl` enum('On','Off') DEFAULT 'Off',
  543. `php_include_path` varchar(256) DEFAULT NULL,
  544. `php_open_basedir` varchar(64) DEFAULT NULL,
  545. `php_apc_stat` tinyint(1) DEFAULT '0',
  546. PRIMARY KEY (`id`),
  547. UNIQUE KEY `domain_id_2` (`domain_id`,`name`),
  548. KEY `account_id` (`account_id`),
  549. KEY `webapp_id` (`webapp_id`),
  550. KEY `phppool_id` (`phppool_id`)
  551. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  552. -- --------------------------------------------------------
  553. --
  554. -- Structure de la table `website_alias`
  555. --
  556. CREATE TABLE IF NOT EXISTS `website_alias` (
  557. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  558. `_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  559. `actif` tinyint(1) NOT NULL DEFAULT '1',
  560. `alias_name` varchar(64) NOT NULL,
  561. `domain_id` int(10) unsigned DEFAULT NULL,
  562. `website_id` int(10) unsigned DEFAULT NULL,
  563. `website_redirect` tinyint(1) NOT NULL DEFAULT '0',
  564. `redirect_url` varchar(128) DEFAULT NULL,
  565. PRIMARY KEY (`id`),
  566. UNIQUE KEY `domain_id` (`domain_id`,`alias_name`),
  567. KEY `website_id` (`website_id`)
  568. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  569. -- --------------------------------------------------------
  570. --
  571. -- Structure de la table `website_phpext_ref`
  572. --
  573. CREATE TABLE IF NOT EXISTS `website_phpext_ref` (
  574. `website_id` int(10) unsigned NOT NULL,
  575. `phpext_id` tinyint(3) unsigned NOT NULL,
  576. PRIMARY KEY (`website_id`,`phpext_id`),
  577. KEY `phpext_id` (`phpext_id`)
  578. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  579. -- --------------------------------------------------------
  580. --
  581. -- Structure de la table `website_php_disable_functions_ref`
  582. --
  583. CREATE TABLE IF NOT EXISTS `website_php_disable_functions_ref` (
  584. `website_id` int(10) unsigned NOT NULL,
  585. `function_id` int(10) unsigned NOT NULL,
  586. PRIMARY KEY (`website_id`,`function_id`),
  587. KEY `function_id` (`function_id`)
  588. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  589. -- --------------------------------------------------------
  590. --
  591. -- Structure de la vue `dovecot_email`
  592. --
  593. DROP TABLE IF EXISTS `dovecot_email`;
  594. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `dovecot_email` AS select if(isnull(`account`.`id`),0,`account`.`id`) AS `account_id`,if(isnull(`account`.`name`),'common',`account`.`name`) AS `account_name`,((isnull(`account`.`actif`) or `account`.`actif`) and `email`.`actif` and `domain`.`email_actif`) AS `actif`,`email`.`name` AS `email_name`,`domain`.`name` AS `domain_name`,concat(`email`.`name`,'@',`domain`.`name`) AS `email`,md5(`email`.`password`) AS `password`,(if(isnull(`account`.`id`),0,`account`.`id`) + 4000) AS `uid`,(if(isnull(`account`.`id`),0,`account`.`id`) + 2000) AS `gid`,concat('/home/siteadm/',if(isnull(`account`.`folder`),'common',`account`.`folder`),'/mail/',`email`.`name`,'@',`domain`.`name`,'/') AS `home`,concat('maildir:/home/siteadm/',if(isnull(`account`.`folder`),'common',`account`.`folder`),'/mail/',`email`.`name`,'@',`domain`.`name`,'/') AS `mail` from ((`email` join `domain` on((`domain`.`id` = `email`.`domain_id`))) left join `account` on((`account`.`id` = `domain`.`account_id`)));
  595. -- --------------------------------------------------------
  596. --
  597. -- Structure de la vue `postfix_alias`
  598. --
  599. DROP TABLE IF EXISTS `postfix_alias`;
  600. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `postfix_alias` AS select if(isnull(`t5`.`id`),0,`t5`.`id`) AS `account_id`,if(isnull(`t5`.`name`),'common',`t5`.`name`) AS `account_name`,concat(`t1`.`name`,'@',`t3`.`name`) AS `destination`,if(isnull(`t4`.`name`),`t2`.`name`,concat(`t2`.`name`,'@',`t4`.`name`)) AS `origine`,((isnull(`t5`.`actif`) or `t5`.`actif`) and `t2`.`actif` and (isnull(`t4`.`email_actif`) or `t4`.`email_actif`)) AS `actif` from ((((`email` `t1` join `email_alias` `t2` on((`t1`.`id` = `t2`.`email_id`))) join `domain` `t3` on((`t1`.`domain_id` = `t3`.`id`))) left join `domain` `t4` on((`t2`.`domain_id` = `t4`.`id`))) left join `account` `t5` on((`t5`.`id` = `t3`.`account_id`)));
  601. -- --------------------------------------------------------
  602. --
  603. -- Structure de la vue `postfix_domain`
  604. --
  605. DROP TABLE IF EXISTS `postfix_domain`;
  606. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `postfix_domain` AS select if(isnull(`t2`.`id`),0,`t2`.`id`) AS `account_id`,if(isnull(`t2`.`name`),'common',`t2`.`name`) AS `account_name`,`t1`.`name` AS `name`,((isnull(`t2`.`actif`) or `t2`.`actif`) and `t1`.`email_actif`) AS `actif` from (`domain` `t1` left join `account` `t2` on((`t2`.`id` = `t1`.`account_id`)));
  607. -- --------------------------------------------------------
  608. --
  609. -- Structure de la vue `postfix_mbox`
  610. --
  611. DROP TABLE IF EXISTS `postfix_mbox`;
  612. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `postfix_mbox` AS select if(isnull(`account`.`id`),0,`account`.`id`) AS `account_id`,if(isnull(`account`.`name`),'common',`account`.`name`) AS `account_name`,(4000 + if(isnull(`account`.`id`),0,`account`.`id`)) AS `uid`,(2000 + if(isnull(`account`.`id`),0,`account`.`id`)) AS `gid`,concat(`email`.`name`,'@',`domain`.`name`) AS `email`,concat(if(isnull(`account`.`folder`),'common',`account`.`folder`),'/mail/',`email`.`name`,'@',`domain`.`name`,'/') AS `maildir`,((`email`.`actif` = '1') and `domain`.`email_actif` and (isnull(`account`.`actif`) or `account`.`actif`)) AS `actif` from ((`email` join `domain` on((`domain`.`id` = `email`.`domain_id`))) left join `account` on((`account`.`id` = `domain`.`account_id`)));
  613. -- --------------------------------------------------------
  614. --
  615. -- Structure de la vue `postfix_redirect`
  616. --
  617. DROP TABLE IF EXISTS `postfix_redirect`;
  618. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `postfix_redirect` AS select if(isnull(`t5`.`id`),0,`t5`.`id`) AS `account_id`,if(isnull(`t5`.`name`),'common',`t5`.`name`) AS `account_name`,`t2`.`redirect_email` AS `destination`,concat(`t2`.`name`,'@',`t3`.`name`) AS `origine`,(`t2`.`actif` and `t3`.`email_actif` and (isnull(`t5`.`actif`) or `t5`.`actif`)) AS `actif` from ((`email_alias` `t2` join `domain` `t3` on((`t3`.`id` = `t2`.`domain_id`))) left join `account` `t5` on((`t5`.`id` = `t3`.`account_id`))) where ((`t2`.`redirect_email` <> '') and (`t2`.`redirect_email` is not null));
  619. -- --------------------------------------------------------
  620. --
  621. -- Structure de la vue `proftpd_user`
  622. --
  623. DROP TABLE IF EXISTS `proftpd_user`;
  624. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `proftpd_user` AS select if(isnull(`account`.`id`),0,`account`.`id`) AS `account_id`,((`account`.`actif` or isnull(`account`.`actif`)) and `ftp_user`.`actif`) AS `actif`,`ftp_user`.`id` AS `id`,concat(if(isnull(`account`.`name`),'common',`account`.`name`),'_',`ftp_user`.`username`) AS `username`,encrypt(`ftp_user`.`password`) AS `password`,(2000 + if(isnull(`account`.`id`),0,`account`.`id`)) AS `uid`,(2000 + if(isnull(`account`.`id`),0,`account`.`id`)) AS `gid`,concat('/home/siteadm/',if(isnull(`account`.`id`),'common',`account`.`folder`),'/',`ftp_user`.`type`,'/',`ftp_user`.`folder`) AS `folder`,'/bin/bash' AS `shell` from (`ftp_user` left join `account` on((`account`.`id` = `ftp_user`.`account_id`)));
  625. --
  626. -- Contraintes pour les tables exportées
  627. --
  628. --
  629. -- Contraintes pour la table `account`
  630. --
  631. ALTER TABLE `account`
  632. ADD CONSTRAINT `account_ibfk_1` FOREIGN KEY (`manager_id`) REFERENCES `account` (`id`) ON DELETE SET NULL,
  633. ADD CONSTRAINT `account_ibfk_2` FOREIGN KEY (`offre_id`) REFERENCES `offre` (`id`);
  634. --
  635. -- Contraintes pour la table `account_language_bin_ref`
  636. --
  637. ALTER TABLE `account_language_bin_ref`
  638. ADD CONSTRAINT `account_language_bin_ref_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`) ON DELETE CASCADE,
  639. ADD CONSTRAINT `account_language_bin_ref_ibfk_2` FOREIGN KEY (`language_bin_id`) REFERENCES `language_bin` (`id`) ON DELETE CASCADE;
  640. --
  641. -- Contraintes pour la table `account_log`
  642. --
  643. ALTER TABLE `account_log`
  644. ADD CONSTRAINT `account_log_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`);
  645. --
  646. -- Contraintes pour la table `account_php_ext_ref`
  647. --
  648. ALTER TABLE `account_php_ext_ref`
  649. ADD CONSTRAINT `account_php_ext_ref_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`) ON DELETE CASCADE,
  650. ADD CONSTRAINT `account_php_ext_ref_ibfk_2` FOREIGN KEY (`phpext_id`) REFERENCES `language_php_ext` (`id`);
  651. --
  652. -- Contraintes pour la table `db`
  653. --
  654. ALTER TABLE `db`
  655. ADD CONSTRAINT `db_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`) ON DELETE CASCADE;
  656. --
  657. -- Contraintes pour la table `domain`
  658. --
  659. ALTER TABLE `domain`
  660. ADD CONSTRAINT `domain_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`) ON DELETE SET NULL;
  661. --
  662. -- Contraintes pour la table `domain_bind`
  663. --
  664. ALTER TABLE `domain_bind`
  665. ADD CONSTRAINT `domain_bind_ibfk_1` FOREIGN KEY (`domain_id`) REFERENCES `domain` (`id`) ON DELETE CASCADE;
  666. --
  667. -- Contraintes pour la table `email`
  668. --
  669. ALTER TABLE `email`
  670. ADD CONSTRAINT `email_ibfk_1` FOREIGN KEY (`domain_id`) REFERENCES `domain` (`id`) ON DELETE CASCADE,
  671. ADD CONSTRAINT `email_ibfk_2` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`) ON DELETE SET NULL;
  672. --
  673. -- Contraintes pour la table `email_alias`
  674. --
  675. ALTER TABLE `email_alias`
  676. ADD CONSTRAINT `email_alias_ibfk_1` FOREIGN KEY (`domain_id`) REFERENCES `domain` (`id`) ON DELETE CASCADE,
  677. ADD CONSTRAINT `email_alias_ibfk_2` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`) ON DELETE SET NULL,
  678. ADD CONSTRAINT `email_alias_ibfk_3` FOREIGN KEY (`email_id`) REFERENCES `email` (`id`);
  679. --
  680. -- Contraintes pour la table `email_sync`
  681. --
  682. ALTER TABLE `email_sync`
  683. ADD CONSTRAINT `email_sync_ibfk_1` FOREIGN KEY (`email_id`) REFERENCES `email` (`id`) ON DELETE CASCADE;
  684. --
  685. -- Contraintes pour la table `ftp_user`
  686. --
  687. ALTER TABLE `ftp_user`
  688. ADD CONSTRAINT `ftp_user_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`);
  689. --
  690. -- Contraintes pour la table `install_bin`
  691. --
  692. ALTER TABLE `install_bin`
  693. ADD CONSTRAINT `install_bin_ibfk_1` FOREIGN KEY (`package_id`) REFERENCES `install_packages` (`id`) ON DELETE SET NULL;
  694. --
  695. -- Contraintes pour la table `language_bin`
  696. --
  697. ALTER TABLE `language_bin`
  698. ADD CONSTRAINT `language_bin_ibfk_1` FOREIGN KEY (`language_id`) REFERENCES `language` (`id`) ON DELETE CASCADE;
  699. --
  700. -- Contraintes pour la table `language_bin_php_ext_ref`
  701. --
  702. ALTER TABLE `language_bin_php_ext_ref`
  703. ADD CONSTRAINT `language_bin_php_ext_ref_ibfk_3` FOREIGN KEY (`language_bin_id`) REFERENCES `language_bin` (`id`) ON DELETE CASCADE,
  704. ADD CONSTRAINT `language_bin_php_ext_ref_ibfk_4` FOREIGN KEY (`ext_id`) REFERENCES `language_php_ext` (`id`);
  705. --
  706. -- Contraintes pour la table `language_compile_options`
  707. --
  708. ALTER TABLE `language_compile_options`
  709. ADD CONSTRAINT `language_compile_options_ibfk_1` FOREIGN KEY (`language_id`) REFERENCES `language` (`id`) ON DELETE CASCADE;
  710. --
  711. -- Contraintes pour la table `mysql`
  712. --
  713. ALTER TABLE `mysql`
  714. ADD CONSTRAINT `mysql_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`) ON DELETE SET NULL;
  715. --
  716. -- Contraintes pour la table `phpapp`
  717. --
  718. ALTER TABLE `phpapp`
  719. ADD CONSTRAINT `phpapp_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`) ON DELETE SET NULL,
  720. ADD CONSTRAINT `phpapp_ibfk_2` FOREIGN KEY (`language_bin_id`) REFERENCES `language_bin` (`id`);
  721. --
  722. -- Contraintes pour la table `phpapp_ext_ref`
  723. --
  724. ALTER TABLE `phpapp_ext_ref`
  725. ADD CONSTRAINT `phpapp_ext_ref_ibfk_1` FOREIGN KEY (`phpapp_id`) REFERENCES `phpapp` (`id`) ON DELETE CASCADE,
  726. ADD CONSTRAINT `phpapp_ext_ref_ibfk_2` FOREIGN KEY (`ext_id`) REFERENCES `language_php_ext` (`id`);
  727. --
  728. -- Contraintes pour la table `phppool`
  729. --
  730. ALTER TABLE `phppool`
  731. ADD CONSTRAINT `phppool_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`) ON DELETE SET NULL,
  732. ADD CONSTRAINT `phppool_ibfk_3` FOREIGN KEY (`language_bin_id`) REFERENCES `language_bin` (`id`),
  733. ADD CONSTRAINT `phppool_ibfk_4` FOREIGN KEY (`phpapp_id`) REFERENCES `phpapp` (`id`);
  734. --
  735. -- Contraintes pour la table `phppool_disable_functions_ref`
  736. --
  737. ALTER TABLE `phppool_disable_functions_ref`
  738. ADD CONSTRAINT `phppool_disable_functions_ref_ibfk_1` FOREIGN KEY (`phppool_id`) REFERENCES `phppool` (`id`) ON DELETE CASCADE,
  739. ADD CONSTRAINT `phppool_disable_functions_ref_ibfk_2` FOREIGN KEY (`function_id`) REFERENCES `language_php_functions` (`id`);
  740. --
  741. -- Contraintes pour la table `phppool_ext_ref`
  742. --
  743. ALTER TABLE `phppool_ext_ref`
  744. ADD CONSTRAINT `phppool_ext_ref_ibfk_1` FOREIGN KEY (`phppool_id`) REFERENCES `phppool` (`id`) ON DELETE CASCADE,
  745. ADD CONSTRAINT `phppool_ext_ref_ibfk_2` FOREIGN KEY (`ext_id`) REFERENCES `language_php_ext` (`id`);
  746. --
  747. -- Contraintes pour la table `website`
  748. --
  749. ALTER TABLE `website`
  750. ADD CONSTRAINT `website_ibfk_10` FOREIGN KEY (`phppool_id`) REFERENCES `phppool` (`id`),
  751. ADD CONSTRAINT `website_ibfk_3` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`) ON DELETE SET NULL,
  752. ADD CONSTRAINT `website_ibfk_8` FOREIGN KEY (`domain_id`) REFERENCES `domain` (`id`),
  753. ADD CONSTRAINT `website_ibfk_9` FOREIGN KEY (`webapp_id`) REFERENCES `webapp` (`id`);
  754. --
  755. -- Contraintes pour la table `website_alias`
  756. --
  757. ALTER TABLE `website_alias`
  758. ADD CONSTRAINT `website_alias_ibfk_3` FOREIGN KEY (`domain_id`) REFERENCES `domain` (`id`),
  759. ADD CONSTRAINT `website_alias_ibfk_4` FOREIGN KEY (`website_id`) REFERENCES `website` (`id`);
  760. --
  761. -- Contraintes pour la table `website_phpext_ref`
  762. --
  763. ALTER TABLE `website_phpext_ref`
  764. ADD CONSTRAINT `website_phpext_ref_ibfk_1` FOREIGN KEY (`website_id`) REFERENCES `website` (`id`) ON DELETE CASCADE,
  765. ADD CONSTRAINT `website_phpext_ref_ibfk_2` FOREIGN KEY (`phpext_id`) REFERENCES `language_php_ext` (`id`);
  766. --
  767. -- Contraintes pour la table `website_php_disable_functions_ref`
  768. --
  769. ALTER TABLE `website_php_disable_functions_ref`
  770. ADD CONSTRAINT `website_php_disable_functions_ref_ibfk_1` FOREIGN KEY (`website_id`) REFERENCES `website` (`id`) ON DELETE CASCADE,
  771. ADD CONSTRAINT `website_php_disable_functions_ref_ibfk_2` FOREIGN KEY (`function_id`) REFERENCES `language_php_functions` (`id`);