schema.php 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * Abstract schema for CakePHP tests.
  5. *
  6. * This format resembles the existing fixture schema
  7. * and is converted to SQL via the Schema generation
  8. * features of the Database package.
  9. */
  10. return [
  11. [
  12. 'table' => 'binary_uuid_items',
  13. 'columns' => [
  14. 'id' => [
  15. 'type' => 'binaryuuid',
  16. ],
  17. 'name' => [
  18. 'type' => 'string',
  19. 'null' => false,
  20. ],
  21. 'published' => [
  22. 'type' => 'boolean',
  23. 'null' => false,
  24. ],
  25. ],
  26. 'constraints' => [
  27. 'primary' => [
  28. 'type' => 'primary',
  29. 'columns' => [
  30. 'id',
  31. ],
  32. ],
  33. ],
  34. ],
  35. [
  36. 'table' => 'unique_authors',
  37. 'columns' => [
  38. 'id' => [
  39. 'type' => 'integer',
  40. ],
  41. 'first_author_id' => [
  42. 'type' => 'integer',
  43. 'null' => true,
  44. ],
  45. 'second_author_id' => [
  46. 'type' => 'integer',
  47. 'null' => false,
  48. ],
  49. ],
  50. 'constraints' => [
  51. 'primary' => [
  52. 'type' => 'primary',
  53. 'columns' => [
  54. 'id',
  55. ],
  56. ],
  57. 'nullable_non_nullable_unique' => [
  58. 'type' => 'unique',
  59. 'columns' => [
  60. 'first_author_id',
  61. 'second_author_id',
  62. ],
  63. ],
  64. ],
  65. ],
  66. [
  67. 'table' => 'articles_more_translations',
  68. 'columns' => [
  69. 'id' => [
  70. 'type' => 'integer',
  71. ],
  72. 'locale' => [
  73. 'type' => 'string',
  74. 'null' => false,
  75. ],
  76. 'title' => [
  77. 'type' => 'string',
  78. 'null' => false,
  79. ],
  80. 'subtitle' => [
  81. 'type' => 'string',
  82. 'null' => false,
  83. ],
  84. 'body' => 'text',
  85. ],
  86. 'constraints' => [
  87. 'primary' => [
  88. 'type' => 'primary',
  89. 'columns' => [
  90. 'id',
  91. 'locale',
  92. ],
  93. ],
  94. ],
  95. ],
  96. [
  97. 'table' => 'users',
  98. 'columns' => [
  99. 'id' => [
  100. 'type' => 'integer',
  101. ],
  102. 'username' => [
  103. 'type' => 'string',
  104. 'null' => true,
  105. ],
  106. 'password' => [
  107. 'type' => 'string',
  108. 'null' => true,
  109. ],
  110. 'created' => [
  111. 'type' => 'timestamp',
  112. 'null' => true,
  113. ],
  114. 'updated' => [
  115. 'type' => 'timestamp',
  116. 'null' => true,
  117. ],
  118. ],
  119. 'constraints' => [
  120. 'primary' => [
  121. 'type' => 'primary',
  122. 'columns' => [
  123. 'id',
  124. ],
  125. ],
  126. ],
  127. ],
  128. [
  129. 'table' => 'featured_tags',
  130. 'columns' => [
  131. 'tag_id' => [
  132. 'type' => 'integer',
  133. 'null' => false,
  134. ],
  135. 'priority' => [
  136. 'type' => 'integer',
  137. 'null' => false,
  138. ],
  139. ],
  140. 'constraints' => [
  141. 'primary' => [
  142. 'type' => 'primary',
  143. 'columns' => [
  144. 'tag_id',
  145. ],
  146. ],
  147. ],
  148. ],
  149. [
  150. 'table' => 'column_schema_aware_type_values',
  151. 'columns' => [
  152. 'id' => [
  153. 'type' => 'integer',
  154. ],
  155. 'val' => [
  156. 'type' => 'text',
  157. 'null' => false,
  158. 'comment' => 'Fixture comment',
  159. ],
  160. ],
  161. 'constraints' => [
  162. 'primary' => [
  163. 'type' => 'primary',
  164. 'columns' => [
  165. 'id',
  166. ],
  167. ],
  168. ],
  169. ],
  170. [
  171. 'table' => 'sections_members',
  172. 'columns' => [
  173. 'id' => [
  174. 'type' => 'integer',
  175. ],
  176. 'section_id' => [
  177. 'type' => 'integer',
  178. ],
  179. 'member_id' => [
  180. 'type' => 'integer',
  181. ],
  182. ],
  183. 'constraints' => [
  184. 'primary' => [
  185. 'type' => 'primary',
  186. 'columns' => [
  187. 'id',
  188. ],
  189. ],
  190. ],
  191. ],
  192. [
  193. 'table' => 'site_articles_tags',
  194. 'columns' => [
  195. 'article_id' => [
  196. 'type' => 'integer',
  197. 'null' => false,
  198. ],
  199. 'tag_id' => [
  200. 'type' => 'integer',
  201. 'null' => false,
  202. ],
  203. 'site_id' => [
  204. 'type' => 'integer',
  205. 'null' => false,
  206. ],
  207. ],
  208. 'constraints' => [
  209. 'UNIQUE_TAG2' => [
  210. 'type' => 'primary',
  211. 'columns' => [
  212. 'article_id',
  213. 'tag_id',
  214. 'site_id',
  215. ],
  216. ],
  217. ],
  218. ],
  219. [
  220. 'table' => 'authors_translations',
  221. 'columns' => [
  222. 'id' => [
  223. 'type' => 'integer',
  224. ],
  225. 'locale' => [
  226. 'type' => 'string',
  227. 'null' => false,
  228. ],
  229. 'name' => [
  230. 'type' => 'string',
  231. 'null' => false,
  232. ],
  233. ],
  234. 'constraints' => [
  235. 'primary' => [
  236. 'type' => 'primary',
  237. 'columns' => [
  238. 'id',
  239. 'locale',
  240. ],
  241. ],
  242. ],
  243. ],
  244. [
  245. 'table' => 'binary_uuid_items_binary_uuid_tags',
  246. 'columns' => [
  247. 'id' => [
  248. 'type' => 'integer',
  249. ],
  250. 'binary_uuid_item_id' => [
  251. 'type' => 'binaryuuid',
  252. 'null' => false,
  253. ],
  254. 'binary_uuid_tag_id' => [
  255. 'type' => 'binaryuuid',
  256. 'null' => false,
  257. ],
  258. ],
  259. 'constraints' => [
  260. 'primary' => [
  261. 'type' => 'primary',
  262. 'columns' => [
  263. 'id',
  264. ],
  265. ],
  266. 'unique_item_tag' => [
  267. 'type' => 'unique',
  268. 'columns' => [
  269. 'binary_uuid_item_id',
  270. 'binary_uuid_tag_id',
  271. ],
  272. ],
  273. ],
  274. ],
  275. [
  276. 'table' => 'auth_users',
  277. 'columns' => [
  278. 'id' => [
  279. 'type' => 'integer',
  280. ],
  281. 'username' => [
  282. 'type' => 'string',
  283. 'null' => false,
  284. ],
  285. 'password' => [
  286. 'type' => 'string',
  287. 'null' => false,
  288. ],
  289. 'created' => 'datetime',
  290. 'updated' => 'datetime',
  291. ],
  292. 'constraints' => [
  293. 'primary' => [
  294. 'type' => 'primary',
  295. 'columns' => [
  296. 'id',
  297. ],
  298. ],
  299. ],
  300. ],
  301. [
  302. 'table' => 'counter_cache_categories',
  303. 'columns' => [
  304. 'id' => [
  305. 'type' => 'integer',
  306. ],
  307. 'name' => [
  308. 'type' => 'string',
  309. 'length' => 255,
  310. 'null' => false,
  311. ],
  312. 'post_count' => [
  313. 'type' => 'integer',
  314. 'null' => true,
  315. ],
  316. ],
  317. 'constraints' => [
  318. 'primary' => [
  319. 'type' => 'primary',
  320. 'columns' => [
  321. 'id',
  322. ],
  323. ],
  324. ],
  325. ],
  326. [
  327. 'table' => 'date_keys',
  328. 'columns' => [
  329. 'id' => [
  330. 'type' => 'date',
  331. ],
  332. 'title' => [
  333. 'type' => 'string',
  334. 'null' => true,
  335. ],
  336. ],
  337. 'constraints' => [
  338. 'primary' => [
  339. 'type' => 'primary',
  340. 'columns' => [
  341. 'id',
  342. ],
  343. ],
  344. ],
  345. ],
  346. [
  347. 'table' => 'counter_cache_posts',
  348. 'columns' => [
  349. 'id' => [
  350. 'type' => 'integer',
  351. ],
  352. 'title' => [
  353. 'type' => 'string',
  354. 'length' => 255,
  355. ],
  356. 'user_id' => [
  357. 'type' => 'integer',
  358. 'null' => true,
  359. ],
  360. 'category_id' => [
  361. 'type' => 'integer',
  362. 'null' => true,
  363. ],
  364. 'published' => [
  365. 'type' => 'boolean',
  366. 'null' => false,
  367. 'default' => false,
  368. ],
  369. ],
  370. 'constraints' => [
  371. 'primary' => [
  372. 'type' => 'primary',
  373. 'columns' => [
  374. 'id',
  375. ],
  376. ],
  377. ],
  378. ],
  379. [
  380. 'table' => 'test_plugin_comments',
  381. 'columns' => [
  382. 'id' => [
  383. 'type' => 'integer',
  384. ],
  385. 'article_id' => [
  386. 'type' => 'integer',
  387. 'null' => false,
  388. ],
  389. 'user_id' => [
  390. 'type' => 'integer',
  391. 'null' => false,
  392. ],
  393. 'comment' => 'text',
  394. 'published' => [
  395. 'type' => 'string',
  396. 'length' => 1,
  397. 'default' => 'N',
  398. ],
  399. 'created' => 'datetime',
  400. 'updated' => 'datetime',
  401. ],
  402. 'constraints' => [
  403. 'primary' => [
  404. 'type' => 'primary',
  405. 'columns' => [
  406. 'id',
  407. ],
  408. ],
  409. ],
  410. ],
  411. [
  412. 'table' => 'members',
  413. 'columns' => [
  414. 'id' => [
  415. 'type' => 'integer',
  416. ],
  417. 'section_count' => [
  418. 'type' => 'integer',
  419. ],
  420. ],
  421. 'constraints' => [
  422. 'primary' => [
  423. 'type' => 'primary',
  424. 'columns' => [
  425. 'id',
  426. ],
  427. ],
  428. ],
  429. ],
  430. [
  431. 'table' => 'uuid_items',
  432. 'columns' => [
  433. 'id' => [
  434. 'type' => 'uuid',
  435. ],
  436. 'published' => [
  437. 'type' => 'boolean',
  438. 'null' => false,
  439. ],
  440. 'name' => [
  441. 'type' => 'string',
  442. 'null' => false,
  443. ],
  444. ],
  445. 'constraints' => [
  446. 'primary' => [
  447. 'type' => 'primary',
  448. 'columns' => [
  449. 'id',
  450. ],
  451. ],
  452. ],
  453. ],
  454. [
  455. 'table' => 'special_tags_translations',
  456. 'columns' => [
  457. 'id' => [
  458. 'type' => 'integer',
  459. ],
  460. 'locale' => [
  461. 'type' => 'string',
  462. 'null' => false,
  463. ],
  464. 'extra_info' => [
  465. 'type' => 'string',
  466. ],
  467. ],
  468. 'constraints' => [
  469. 'primary' => [
  470. 'type' => 'primary',
  471. 'columns' => [
  472. 'id',
  473. 'locale',
  474. ],
  475. ],
  476. ],
  477. ],
  478. [
  479. 'table' => 'articles',
  480. 'columns' => [
  481. 'id' => [
  482. 'type' => 'integer',
  483. ],
  484. 'author_id' => [
  485. 'type' => 'integer',
  486. 'null' => true,
  487. ],
  488. 'title' => [
  489. 'type' => 'string',
  490. 'null' => true,
  491. ],
  492. 'body' => 'text',
  493. 'published' => [
  494. 'type' => 'string',
  495. 'length' => 1,
  496. 'default' => 'N',
  497. ],
  498. ],
  499. 'constraints' => [
  500. 'primary' => [
  501. 'type' => 'primary',
  502. 'columns' => [
  503. 'id',
  504. ],
  505. ],
  506. ],
  507. ],
  508. [
  509. 'table' => 'articles_translations',
  510. 'columns' => [
  511. 'id' => [
  512. 'type' => 'integer',
  513. ],
  514. 'locale' => [
  515. 'type' => 'string',
  516. 'null' => false,
  517. ],
  518. 'title' => [
  519. 'type' => 'string',
  520. 'null' => true,
  521. ],
  522. 'body' => 'text',
  523. ],
  524. 'constraints' => [
  525. 'primary' => [
  526. 'type' => 'primary',
  527. 'columns' => [
  528. 'id',
  529. 'locale',
  530. ],
  531. ],
  532. ],
  533. ],
  534. [
  535. 'table' => 'products',
  536. 'columns' => [
  537. 'id' => [
  538. 'type' => 'integer',
  539. ],
  540. 'category' => [
  541. 'type' => 'integer',
  542. 'null' => false,
  543. ],
  544. 'name' => [
  545. 'type' => 'string',
  546. 'null' => false,
  547. ],
  548. 'price' => [
  549. 'type' => 'integer',
  550. ],
  551. ],
  552. 'constraints' => [
  553. 'primary' => [
  554. 'type' => 'primary',
  555. 'columns' => [
  556. 'category',
  557. 'id',
  558. ],
  559. ],
  560. ],
  561. ],
  562. [
  563. 'table' => 'orders',
  564. 'columns' => [
  565. 'id' => [
  566. 'type' => 'integer',
  567. ],
  568. 'product_category' => [
  569. 'type' => 'integer',
  570. 'null' => false,
  571. ],
  572. 'product_id' => [
  573. 'type' => 'integer',
  574. 'null' => false,
  575. ],
  576. ],
  577. 'constraints' => [
  578. 'primary' => [
  579. 'type' => 'primary',
  580. 'columns' => [
  581. 'id',
  582. ],
  583. ],
  584. 'product_category_fk' => [
  585. 'type' => 'foreign',
  586. 'columns' => [
  587. 'product_category',
  588. 'product_id',
  589. ],
  590. 'references' => [
  591. 'products',
  592. [
  593. 'category',
  594. 'id',
  595. ],
  596. ],
  597. 'update' => 'cascade',
  598. 'delete' => 'cascade',
  599. ],
  600. ],
  601. 'indexes' => [
  602. 'product_category' => [
  603. 'type' => 'index',
  604. 'columns' => [
  605. 'product_category',
  606. 'product_id',
  607. ],
  608. ],
  609. ],
  610. ],
  611. [
  612. 'table' => 'comments',
  613. 'columns' => [
  614. 'id' => [
  615. 'type' => 'integer',
  616. ],
  617. 'article_id' => [
  618. 'type' => 'integer',
  619. 'null' => false,
  620. ],
  621. 'user_id' => [
  622. 'type' => 'integer',
  623. 'null' => false,
  624. ],
  625. 'comment' => [
  626. 'type' => 'text',
  627. ],
  628. 'published' => [
  629. 'type' => 'string',
  630. 'length' => 1,
  631. 'default' => 'N',
  632. ],
  633. 'created' => [
  634. 'type' => 'datetime',
  635. ],
  636. 'updated' => [
  637. 'type' => 'datetime',
  638. ],
  639. ],
  640. 'constraints' => [
  641. 'primary' => [
  642. 'type' => 'primary',
  643. 'columns' => [
  644. 'id',
  645. ],
  646. ],
  647. ],
  648. ],
  649. [
  650. 'table' => 'datatypes',
  651. 'columns' => [
  652. 'id' => [
  653. 'type' => 'biginteger',
  654. ],
  655. 'cost' => [
  656. 'type' => 'decimal',
  657. 'length' => 20,
  658. 'precision' => 1,
  659. 'null' => true,
  660. ],
  661. 'fraction' => [
  662. 'type' => 'decimal',
  663. 'length' => 20,
  664. 'precision' => 19,
  665. 'null' => true,
  666. ],
  667. 'floaty' => [
  668. 'type' => 'float',
  669. 'null' => true,
  670. ],
  671. 'small' => [
  672. 'type' => 'smallinteger',
  673. 'null' => true,
  674. ],
  675. 'tiny' => [
  676. 'type' => 'tinyinteger',
  677. 'null' => true,
  678. ],
  679. ],
  680. 'constraints' => [
  681. 'primary' => [
  682. 'type' => 'primary',
  683. 'columns' => [
  684. 'id',
  685. ],
  686. ],
  687. ],
  688. ],
  689. [
  690. 'table' => 'authors',
  691. 'columns' => [
  692. 'id' => [
  693. 'type' => 'integer',
  694. ],
  695. 'name' => [
  696. 'type' => 'string',
  697. 'default' => null,
  698. ],
  699. ],
  700. 'constraints' => [
  701. 'primary' => [
  702. 'type' => 'primary',
  703. 'columns' => [
  704. 'id',
  705. ],
  706. ],
  707. ],
  708. ],
  709. [
  710. 'table' => 'counter_cache_comments',
  711. 'columns' => [
  712. 'id' => [
  713. 'type' => 'integer',
  714. ],
  715. 'title' => [
  716. 'type' => 'string',
  717. 'length' => 255,
  718. ],
  719. 'user_id' => [
  720. 'type' => 'integer',
  721. 'null' => true,
  722. ],
  723. ],
  724. 'constraints' => [
  725. 'primary' => [
  726. 'type' => 'primary',
  727. 'columns' => [
  728. 'id',
  729. ],
  730. ],
  731. ],
  732. ],
  733. [
  734. 'table' => 'special_tags',
  735. 'columns' => [
  736. 'id' => [
  737. 'type' => 'integer',
  738. ],
  739. 'article_id' => [
  740. 'type' => 'integer',
  741. 'null' => false,
  742. ],
  743. 'tag_id' => [
  744. 'type' => 'integer',
  745. 'null' => false,
  746. ],
  747. 'highlighted' => [
  748. 'type' => 'boolean',
  749. 'null' => true,
  750. ],
  751. 'highlighted_time' => [
  752. 'type' => 'timestamp',
  753. 'null' => true,
  754. ],
  755. 'extra_info' => [
  756. 'type' => 'string',
  757. ],
  758. 'author_id' => [
  759. 'type' => 'integer',
  760. 'null' => true,
  761. ],
  762. ],
  763. 'constraints' => [
  764. 'primary' => [
  765. 'type' => 'primary',
  766. 'columns' => [
  767. 'id',
  768. ],
  769. ],
  770. 'UNIQUE_TAG2' => [
  771. 'type' => 'unique',
  772. 'columns' => [
  773. 'article_id',
  774. 'tag_id',
  775. ],
  776. ],
  777. ],
  778. ],
  779. [
  780. 'table' => 'ordered_uuid_items',
  781. 'columns' => [
  782. 'id' => [
  783. 'type' => 'string',
  784. 'length' => 32,
  785. ],
  786. 'published' => [
  787. 'type' => 'boolean',
  788. 'null' => false,
  789. ],
  790. 'name' => [
  791. 'type' => 'string',
  792. 'null' => false,
  793. ],
  794. ],
  795. 'constraints' => [
  796. 'primary' => [
  797. 'type' => 'primary',
  798. 'columns' => [
  799. 'id',
  800. ],
  801. ],
  802. ],
  803. ],
  804. [
  805. 'table' => 'counter_cache_users',
  806. 'columns' => [
  807. 'id' => [
  808. 'type' => 'integer',
  809. ],
  810. 'name' => [
  811. 'type' => 'string',
  812. 'length' => 255,
  813. 'null' => false,
  814. ],
  815. 'post_count' => [
  816. 'type' => 'integer',
  817. 'null' => true,
  818. ],
  819. 'comment_count' => [
  820. 'type' => 'integer',
  821. 'null' => true,
  822. ],
  823. 'posts_published' => [
  824. 'type' => 'integer',
  825. 'null' => true,
  826. ],
  827. ],
  828. 'constraints' => [
  829. 'primary' => [
  830. 'type' => 'primary',
  831. 'columns' => [
  832. 'id',
  833. ],
  834. ],
  835. ],
  836. ],
  837. [
  838. 'table' => 'tags',
  839. 'columns' => [
  840. 'id' => [
  841. 'type' => 'integer',
  842. 'null' => false,
  843. ],
  844. 'name' => [
  845. 'type' => 'string',
  846. 'null' => false,
  847. ],
  848. 'description' => [
  849. 'type' => 'text',
  850. 'length' => 16777215,
  851. ],
  852. 'created' => [
  853. 'type' => 'datetime',
  854. 'null' => true,
  855. 'default' => null,
  856. ],
  857. ],
  858. 'constraints' => [
  859. 'primary' => [
  860. 'type' => 'primary',
  861. 'columns' => [
  862. 'id',
  863. ],
  864. ],
  865. ],
  866. ],
  867. [
  868. 'table' => 'articles_tags',
  869. 'columns' => [
  870. 'article_id' => [
  871. 'type' => 'integer',
  872. 'null' => false,
  873. ],
  874. 'tag_id' => [
  875. 'type' => 'integer',
  876. 'null' => false,
  877. ],
  878. ],
  879. 'constraints' => [
  880. 'unique_tag' => [
  881. 'type' => 'primary',
  882. 'columns' => [
  883. 'article_id',
  884. 'tag_id',
  885. ],
  886. ],
  887. 'tag_id_fk' => [
  888. 'type' => 'foreign',
  889. 'columns' => [
  890. 'tag_id',
  891. ],
  892. 'references' => [
  893. 'tags',
  894. 'id',
  895. ],
  896. 'update' => 'cascade',
  897. 'delete' => 'cascade',
  898. ],
  899. ],
  900. ],
  901. [
  902. 'table' => 'articles_tags_binding_keys',
  903. 'columns' => [
  904. 'article_id' => [
  905. 'type' => 'integer',
  906. 'null' => false,
  907. ],
  908. 'tagname' => [
  909. 'type' => 'string',
  910. 'null' => false,
  911. ],
  912. ],
  913. 'constraints' => [
  914. 'unique_tag' => [
  915. 'type' => 'primary',
  916. 'columns' => [
  917. 'article_id',
  918. 'tagname',
  919. ],
  920. ],
  921. ],
  922. ],
  923. [
  924. 'table' => 'composite_key_articles',
  925. 'columns' => [
  926. 'author_id' => [
  927. 'type' => 'integer',
  928. 'null' => false,
  929. ],
  930. 'created' => [
  931. 'type' => 'datetime',
  932. 'null' => false,
  933. ],
  934. 'body' => [
  935. 'type' => 'text',
  936. ],
  937. ],
  938. 'constraints' => [
  939. 'composite_article_pk' => [
  940. 'type' => 'primary',
  941. 'columns' => [
  942. 'author_id',
  943. 'created',
  944. ],
  945. ],
  946. ],
  947. ],
  948. [
  949. 'table' => 'composite_key_articles_tags',
  950. 'columns' => [
  951. 'author_id' => [
  952. 'type' => 'integer',
  953. 'null' => false,
  954. ],
  955. 'created' => [
  956. 'type' => 'datetime',
  957. 'null' => false,
  958. ],
  959. 'tag_id' => [
  960. 'type' => 'integer',
  961. 'null' => false,
  962. ],
  963. ],
  964. 'constraints' => [
  965. 'composite_article_tags_pk' => [
  966. 'type' => 'primary',
  967. 'columns' => [
  968. 'author_id',
  969. 'created',
  970. 'tag_id',
  971. ],
  972. ],
  973. ],
  974. ],
  975. [
  976. 'table' => 'profiles',
  977. 'columns' => [
  978. 'id' => [
  979. 'type' => 'integer',
  980. 'null' => false,
  981. 'autoIncrement' => true,
  982. ],
  983. 'user_id' => [
  984. 'type' => 'integer',
  985. 'null' => false,
  986. ],
  987. 'first_name' => [
  988. 'type' => 'string',
  989. 'null' => true,
  990. ],
  991. 'last_name' => [
  992. 'type' => 'string',
  993. 'null' => true,
  994. ],
  995. 'is_active' => [
  996. 'type' => 'boolean',
  997. 'null' => false,
  998. 'default' => true,
  999. ],
  1000. ],
  1001. 'constraints' => [
  1002. 'primary' => [
  1003. 'type' => 'primary',
  1004. 'columns' => [
  1005. 'id',
  1006. ],
  1007. ],
  1008. ],
  1009. ],
  1010. [
  1011. 'table' => 'sessions',
  1012. 'columns' => [
  1013. 'id' => [
  1014. 'type' => 'string',
  1015. 'length' => 128,
  1016. ],
  1017. 'data' => [
  1018. 'type' => 'binary',
  1019. 'length' => 16777215,
  1020. 'null' => true,
  1021. ],
  1022. 'expires' => [
  1023. 'type' => 'integer',
  1024. 'length' => 11,
  1025. 'null' => true,
  1026. ],
  1027. ],
  1028. 'constraints' => [
  1029. 'primary' => [
  1030. 'type' => 'primary',
  1031. 'columns' => [
  1032. 'id',
  1033. ],
  1034. ],
  1035. ],
  1036. ],
  1037. [
  1038. 'table' => 'comments_translations',
  1039. 'columns' => [
  1040. 'id' => [
  1041. 'type' => 'integer',
  1042. ],
  1043. 'locale' => [
  1044. 'type' => 'string',
  1045. 'null' => false,
  1046. ],
  1047. 'comment' => 'text',
  1048. ],
  1049. 'constraints' => [
  1050. 'primary' => [
  1051. 'type' => 'primary',
  1052. 'columns' => [
  1053. 'id',
  1054. 'locale',
  1055. ],
  1056. ],
  1057. ],
  1058. ],
  1059. [
  1060. 'table' => 'menu_link_trees',
  1061. 'columns' => [
  1062. 'id' => [
  1063. 'type' => 'integer',
  1064. ],
  1065. 'menu' => [
  1066. 'type' => 'string',
  1067. 'null' => false,
  1068. ],
  1069. 'lft' => [
  1070. 'type' => 'integer',
  1071. ],
  1072. 'rght' => [
  1073. 'type' => 'integer',
  1074. ],
  1075. 'parent_id' => 'integer',
  1076. 'url' => [
  1077. 'type' => 'string',
  1078. 'null' => false,
  1079. ],
  1080. 'title' => [
  1081. 'type' => 'string',
  1082. 'null' => false,
  1083. ],
  1084. ],
  1085. 'constraints' => [
  1086. 'primary' => [
  1087. 'type' => 'primary',
  1088. 'columns' => [
  1089. 'id',
  1090. ],
  1091. ],
  1092. ],
  1093. ],
  1094. [
  1095. 'table' => 'polymorphic_tagged',
  1096. 'columns' => [
  1097. 'id' => [
  1098. 'type' => 'integer',
  1099. ],
  1100. 'tag_id' => [
  1101. 'type' => 'integer',
  1102. ],
  1103. 'foreign_key' => [
  1104. 'type' => 'integer',
  1105. ],
  1106. 'foreign_model' => [
  1107. 'type' => 'string',
  1108. ],
  1109. 'position' => [
  1110. 'type' => 'integer',
  1111. 'null' => true,
  1112. ],
  1113. ],
  1114. 'constraints' => [
  1115. 'primary' => [
  1116. 'type' => 'primary',
  1117. 'columns' => [
  1118. 'id',
  1119. ],
  1120. ],
  1121. ],
  1122. ],
  1123. [
  1124. 'table' => 'things',
  1125. 'columns' => [
  1126. 'id' => [
  1127. 'type' => 'integer',
  1128. ],
  1129. 'title' => [
  1130. 'type' => 'string',
  1131. 'length' => 20,
  1132. ],
  1133. 'body' => [
  1134. 'type' => 'string',
  1135. 'length' => 50,
  1136. ],
  1137. ],
  1138. ],
  1139. [
  1140. 'table' => 'site_articles',
  1141. 'columns' => [
  1142. 'id' => [
  1143. 'type' => 'integer',
  1144. ],
  1145. 'author_id' => [
  1146. 'type' => 'integer',
  1147. 'null' => true,
  1148. ],
  1149. 'site_id' => [
  1150. 'type' => 'integer',
  1151. 'null' => false,
  1152. ],
  1153. 'title' => [
  1154. 'type' => 'string',
  1155. 'null' => true,
  1156. ],
  1157. 'body' => 'text',
  1158. ],
  1159. 'constraints' => [
  1160. 'primary' => [
  1161. 'type' => 'primary',
  1162. 'columns' => [
  1163. 'id',
  1164. 'site_id',
  1165. ],
  1166. ],
  1167. ],
  1168. ],
  1169. [
  1170. 'table' => 'sections_translations',
  1171. 'columns' => [
  1172. 'id' => [
  1173. 'type' => 'integer',
  1174. ],
  1175. 'locale' => [
  1176. 'type' => 'string',
  1177. 'null' => false,
  1178. ],
  1179. 'title' => [
  1180. 'type' => 'string',
  1181. ],
  1182. ],
  1183. 'constraints' => [
  1184. 'primary' => [
  1185. 'type' => 'primary',
  1186. 'columns' => [
  1187. 'id',
  1188. 'locale',
  1189. ],
  1190. ],
  1191. ],
  1192. ],
  1193. [
  1194. 'table' => 'authors_tags',
  1195. 'columns' => [
  1196. 'author_id' => [
  1197. 'type' => 'integer',
  1198. 'null' => false,
  1199. ],
  1200. 'tag_id' => [
  1201. 'type' => 'integer',
  1202. 'null' => false,
  1203. ],
  1204. ],
  1205. 'constraints' => [
  1206. 'unique_tag' => [
  1207. 'type' => 'primary',
  1208. 'columns' => [
  1209. 'author_id',
  1210. 'tag_id',
  1211. ],
  1212. ],
  1213. 'author_id_fk' => [
  1214. 'type' => 'foreign',
  1215. 'columns' => ['author_id'],
  1216. 'references' => ['authors', 'id'],
  1217. 'update' => 'cascade',
  1218. 'delete' => 'cascade',
  1219. ],
  1220. ],
  1221. ],
  1222. [
  1223. 'table' => 'site_authors',
  1224. 'columns' => [
  1225. 'id' => [
  1226. 'type' => 'integer',
  1227. ],
  1228. 'name' => [
  1229. 'type' => 'string',
  1230. 'default' => null,
  1231. ],
  1232. 'site_id' => [
  1233. 'type' => 'integer',
  1234. 'null' => false,
  1235. ],
  1236. ],
  1237. 'constraints' => [
  1238. 'primary' => [
  1239. 'type' => 'primary',
  1240. 'columns' => [
  1241. 'id',
  1242. 'site_id',
  1243. ],
  1244. ],
  1245. ],
  1246. ],
  1247. [
  1248. 'table' => 'i18n',
  1249. 'columns' => [
  1250. 'id' => [
  1251. 'type' => 'integer',
  1252. ],
  1253. 'locale' => [
  1254. 'type' => 'string',
  1255. 'length' => 6,
  1256. 'null' => false,
  1257. ],
  1258. 'model' => [
  1259. 'type' => 'string',
  1260. 'null' => false,
  1261. ],
  1262. 'foreign_key' => [
  1263. 'type' => 'integer',
  1264. 'null' => false,
  1265. ],
  1266. 'field' => [
  1267. 'type' => 'string',
  1268. 'null' => false,
  1269. ],
  1270. 'content' => [
  1271. 'type' => 'text',
  1272. ],
  1273. ],
  1274. 'constraints' => [
  1275. 'primary' => [
  1276. 'type' => 'primary',
  1277. 'columns' => [
  1278. 'id',
  1279. ],
  1280. ],
  1281. ],
  1282. ],
  1283. [
  1284. 'table' => 'number_trees',
  1285. 'columns' => [
  1286. 'id' => [
  1287. 'type' => 'integer',
  1288. ],
  1289. 'name' => [
  1290. 'type' => 'string',
  1291. 'null' => false,
  1292. ],
  1293. 'parent_id' => 'integer',
  1294. 'lft' => [
  1295. 'type' => 'integer',
  1296. ],
  1297. 'rght' => [
  1298. 'type' => 'integer',
  1299. ],
  1300. 'depth' => [
  1301. 'type' => 'integer',
  1302. ],
  1303. ],
  1304. 'constraints' => [
  1305. 'primary' => [
  1306. 'type' => 'primary',
  1307. 'columns' => [
  1308. 'id',
  1309. ],
  1310. ],
  1311. ],
  1312. ],
  1313. [
  1314. 'table' => 'number_trees_articles',
  1315. 'columns' => [
  1316. 'id' => [
  1317. 'type' => 'integer',
  1318. ],
  1319. 'number_tree_id' => [
  1320. 'type' => 'integer',
  1321. 'null' => true,
  1322. ],
  1323. 'title' => [
  1324. 'type' => 'string',
  1325. 'null' => true,
  1326. ],
  1327. 'body' => 'text',
  1328. 'published' => [
  1329. 'type' => 'string',
  1330. 'length' => 1,
  1331. 'default' => 'N',
  1332. ],
  1333. ],
  1334. 'constraints' => [
  1335. 'primary' => [
  1336. 'type' => 'primary',
  1337. 'columns' => [
  1338. 'id',
  1339. ],
  1340. ],
  1341. ],
  1342. ],
  1343. [
  1344. 'table' => 'composite_increments',
  1345. 'columns' => [
  1346. 'id' => [
  1347. 'type' => 'integer',
  1348. 'null' => false,
  1349. 'autoIncrement' => true,
  1350. ],
  1351. 'account_id' => [
  1352. 'type' => 'integer',
  1353. 'null' => false,
  1354. ],
  1355. 'name' => [
  1356. 'type' => 'string',
  1357. 'default' => null,
  1358. ],
  1359. ],
  1360. 'constraints' => [
  1361. 'primary' => [
  1362. 'type' => 'primary',
  1363. 'columns' => [
  1364. 'id',
  1365. 'account_id',
  1366. ],
  1367. ],
  1368. ],
  1369. ],
  1370. [
  1371. 'table' => 'tags_shadow_translations',
  1372. 'columns' => [
  1373. 'id' => [
  1374. 'type' => 'integer',
  1375. ],
  1376. 'locale' => [
  1377. 'type' => 'string',
  1378. 'null' => false,
  1379. ],
  1380. 'name' => [
  1381. 'type' => 'string',
  1382. 'null' => false,
  1383. ],
  1384. ],
  1385. 'constraints' => [
  1386. 'primary' => [
  1387. 'type' => 'primary',
  1388. 'columns' => [
  1389. 'id',
  1390. 'locale',
  1391. ],
  1392. ],
  1393. ],
  1394. ],
  1395. [
  1396. 'table' => 'posts',
  1397. 'columns' => [
  1398. 'id' => [
  1399. 'type' => 'integer',
  1400. ],
  1401. 'author_id' => [
  1402. 'type' => 'integer',
  1403. 'null' => false,
  1404. ],
  1405. 'title' => [
  1406. 'type' => 'string',
  1407. 'null' => false,
  1408. ],
  1409. 'body' => 'text',
  1410. 'published' => [
  1411. 'type' => 'string',
  1412. 'length' => 1,
  1413. 'default' => 'N',
  1414. ],
  1415. ],
  1416. 'constraints' => [
  1417. 'primary' => [
  1418. 'type' => 'primary',
  1419. 'columns' => [
  1420. 'id',
  1421. ],
  1422. ],
  1423. ],
  1424. ],
  1425. [
  1426. 'table' => 'binary_uuid_tags',
  1427. 'columns' => [
  1428. 'id' => [
  1429. 'type' => 'binaryuuid',
  1430. ],
  1431. 'name' => [
  1432. 'type' => 'string',
  1433. 'null' => false,
  1434. ],
  1435. ],
  1436. 'constraints' => [
  1437. 'primary' => [
  1438. 'type' => 'primary',
  1439. 'columns' => [
  1440. 'id',
  1441. ],
  1442. ],
  1443. ],
  1444. ],
  1445. [
  1446. 'table' => 'tags_translations',
  1447. 'columns' => [
  1448. 'id' => [
  1449. 'type' => 'integer',
  1450. 'null' => false,
  1451. 'autoIncrement' => true,
  1452. ],
  1453. 'locale' => [
  1454. 'type' => 'string',
  1455. 'null' => false,
  1456. ],
  1457. 'name' => [
  1458. 'type' => 'string',
  1459. 'null' => false,
  1460. ],
  1461. ],
  1462. 'constraints' => [
  1463. 'primary' => [
  1464. 'type' => 'primary',
  1465. 'columns' => [
  1466. 'id',
  1467. ],
  1468. ],
  1469. ],
  1470. ],
  1471. [
  1472. 'table' => 'cake_sessions',
  1473. 'columns' => [
  1474. 'id' => [
  1475. 'type' => 'string',
  1476. 'length' => 128,
  1477. ],
  1478. 'data' => [
  1479. 'type' => 'text',
  1480. 'null' => true,
  1481. ],
  1482. 'expires' => [
  1483. 'type' => 'integer',
  1484. 'length' => 11,
  1485. 'null' => true,
  1486. ],
  1487. ],
  1488. 'constraints' => [
  1489. 'primary' => [
  1490. 'type' => 'primary',
  1491. 'columns' => [
  1492. 'id',
  1493. ],
  1494. ],
  1495. ],
  1496. ],
  1497. [
  1498. 'table' => 'attachments',
  1499. 'columns' => [
  1500. 'id' => [
  1501. 'type' => 'integer',
  1502. ],
  1503. 'comment_id' => [
  1504. 'type' => 'integer',
  1505. 'null' => false,
  1506. ],
  1507. 'attachment' => [
  1508. 'type' => 'string',
  1509. 'null' => false,
  1510. ],
  1511. 'created' => 'datetime',
  1512. 'updated' => 'datetime',
  1513. ],
  1514. 'constraints' => [
  1515. 'primary' => [
  1516. 'type' => 'primary',
  1517. 'columns' => [
  1518. 'id',
  1519. ],
  1520. ],
  1521. ],
  1522. ],
  1523. [
  1524. 'table' => 'categories',
  1525. 'columns' => [
  1526. 'id' => [
  1527. 'type' => 'integer',
  1528. ],
  1529. 'parent_id' => [
  1530. 'type' => 'integer',
  1531. 'null' => false,
  1532. ],
  1533. 'name' => [
  1534. 'type' => 'string',
  1535. 'null' => false,
  1536. ],
  1537. 'created' => 'datetime',
  1538. 'updated' => 'datetime',
  1539. ],
  1540. 'constraints' => [
  1541. 'primary' => [
  1542. 'type' => 'primary',
  1543. 'columns' => [
  1544. 'id',
  1545. ],
  1546. ],
  1547. ],
  1548. ],
  1549. [
  1550. 'table' => 'sections',
  1551. 'columns' => [
  1552. 'id' => [
  1553. 'type' => 'integer',
  1554. ],
  1555. 'title' => [
  1556. 'type' => 'string',
  1557. ],
  1558. ],
  1559. 'constraints' => [
  1560. 'primary' => [
  1561. 'type' => 'primary',
  1562. 'columns' => [
  1563. 'id',
  1564. ],
  1565. ],
  1566. ],
  1567. ],
  1568. [
  1569. 'table' => 'counter_cache_user_category_posts',
  1570. 'columns' => [
  1571. 'id' => [
  1572. 'type' => 'integer',
  1573. ],
  1574. 'category_id' => [
  1575. 'type' => 'integer',
  1576. ],
  1577. 'user_id' => [
  1578. 'type' => 'integer',
  1579. ],
  1580. 'post_count' => [
  1581. 'type' => 'integer',
  1582. 'null' => true,
  1583. ],
  1584. ],
  1585. 'constraints' => [
  1586. 'primary' => [
  1587. 'type' => 'primary',
  1588. 'columns' => [
  1589. 'id',
  1590. ],
  1591. ],
  1592. ],
  1593. ],
  1594. [
  1595. 'table' => 'site_tags',
  1596. 'columns' => [
  1597. 'id' => [
  1598. 'type' => 'integer',
  1599. ],
  1600. 'site_id' => [
  1601. 'type' => 'integer',
  1602. ],
  1603. 'name' => [
  1604. 'type' => 'string',
  1605. 'null' => false,
  1606. ],
  1607. ],
  1608. 'constraints' => [
  1609. 'primary' => [
  1610. 'type' => 'primary',
  1611. 'columns' => [
  1612. 'id',
  1613. 'site_id',
  1614. ],
  1615. ],
  1616. ],
  1617. ],
  1618. [
  1619. 'table' => 'nullable_authors',
  1620. 'columns' => [
  1621. 'id' => [
  1622. 'type' => 'integer',
  1623. ],
  1624. 'author_id' => [
  1625. 'type' => 'integer',
  1626. 'null' => true,
  1627. ],
  1628. ],
  1629. 'constraints' => [
  1630. 'primary' => [
  1631. 'type' => 'primary',
  1632. 'columns' => [
  1633. 'id',
  1634. ],
  1635. ],
  1636. ],
  1637. ],
  1638. ];