schema.php 39 KB

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