0000_snapshot.json 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703
  1. {
  2. "id": "0dec0586-cf88-4f21-84bf-aaf73e14e71b",
  3. "prevId": "00000000-0000-0000-0000-000000000000",
  4. "version": "7",
  5. "dialect": "postgresql",
  6. "tables": {
  7. "public.attendance": {
  8. "name": "attendance",
  9. "schema": "",
  10. "columns": {
  11. "id": {
  12. "name": "id",
  13. "type": "uuid",
  14. "primaryKey": true,
  15. "notNull": true,
  16. "default": "gen_random_uuid()"
  17. },
  18. "student_id": {
  19. "name": "student_id",
  20. "type": "uuid",
  21. "primaryKey": false,
  22. "notNull": false
  23. },
  24. "class_id": {
  25. "name": "class_id",
  26. "type": "uuid",
  27. "primaryKey": false,
  28. "notNull": false
  29. },
  30. "section_id": {
  31. "name": "section_id",
  32. "type": "uuid",
  33. "primaryKey": false,
  34. "notNull": false
  35. },
  36. "teacher_id": {
  37. "name": "teacher_id",
  38. "type": "uuid",
  39. "primaryKey": false,
  40. "notNull": false
  41. },
  42. "date": {
  43. "name": "date",
  44. "type": "date",
  45. "primaryKey": false,
  46. "notNull": true
  47. },
  48. "status": {
  49. "name": "status",
  50. "type": "varchar(20)",
  51. "primaryKey": false,
  52. "notNull": true
  53. },
  54. "reason": {
  55. "name": "reason",
  56. "type": "text",
  57. "primaryKey": false,
  58. "notNull": false
  59. },
  60. "created_at": {
  61. "name": "created_at",
  62. "type": "timestamp",
  63. "primaryKey": false,
  64. "notNull": false,
  65. "default": "now()"
  66. }
  67. },
  68. "indexes": {},
  69. "foreignKeys": {
  70. "attendance_student_id_users_id_fk": {
  71. "name": "attendance_student_id_users_id_fk",
  72. "tableFrom": "attendance",
  73. "tableTo": "users",
  74. "columnsFrom": [
  75. "student_id"
  76. ],
  77. "columnsTo": [
  78. "id"
  79. ],
  80. "onDelete": "no action",
  81. "onUpdate": "no action"
  82. },
  83. "attendance_class_id_classes_id_fk": {
  84. "name": "attendance_class_id_classes_id_fk",
  85. "tableFrom": "attendance",
  86. "tableTo": "classes",
  87. "columnsFrom": [
  88. "class_id"
  89. ],
  90. "columnsTo": [
  91. "id"
  92. ],
  93. "onDelete": "no action",
  94. "onUpdate": "no action"
  95. },
  96. "attendance_section_id_sections_id_fk": {
  97. "name": "attendance_section_id_sections_id_fk",
  98. "tableFrom": "attendance",
  99. "tableTo": "sections",
  100. "columnsFrom": [
  101. "section_id"
  102. ],
  103. "columnsTo": [
  104. "id"
  105. ],
  106. "onDelete": "no action",
  107. "onUpdate": "no action"
  108. },
  109. "attendance_teacher_id_users_id_fk": {
  110. "name": "attendance_teacher_id_users_id_fk",
  111. "tableFrom": "attendance",
  112. "tableTo": "users",
  113. "columnsFrom": [
  114. "teacher_id"
  115. ],
  116. "columnsTo": [
  117. "id"
  118. ],
  119. "onDelete": "no action",
  120. "onUpdate": "no action"
  121. }
  122. },
  123. "compositePrimaryKeys": {},
  124. "uniqueConstraints": {},
  125. "policies": {},
  126. "checkConstraints": {},
  127. "isRLSEnabled": false
  128. },
  129. "public.classes": {
  130. "name": "classes",
  131. "schema": "",
  132. "columns": {
  133. "id": {
  134. "name": "id",
  135. "type": "uuid",
  136. "primaryKey": true,
  137. "notNull": true,
  138. "default": "gen_random_uuid()"
  139. },
  140. "name": {
  141. "name": "name",
  142. "type": "varchar(100)",
  143. "primaryKey": false,
  144. "notNull": true
  145. },
  146. "code": {
  147. "name": "code",
  148. "type": "varchar(20)",
  149. "primaryKey": false,
  150. "notNull": true
  151. },
  152. "period_id": {
  153. "name": "period_id",
  154. "type": "uuid",
  155. "primaryKey": false,
  156. "notNull": false
  157. },
  158. "is_active": {
  159. "name": "is_active",
  160. "type": "boolean",
  161. "primaryKey": false,
  162. "notNull": false,
  163. "default": true
  164. },
  165. "created_at": {
  166. "name": "created_at",
  167. "type": "timestamp",
  168. "primaryKey": false,
  169. "notNull": false,
  170. "default": "now()"
  171. },
  172. "updated_at": {
  173. "name": "updated_at",
  174. "type": "timestamp",
  175. "primaryKey": false,
  176. "notNull": false,
  177. "default": "now()"
  178. }
  179. },
  180. "indexes": {},
  181. "foreignKeys": {
  182. "classes_period_id_periods_id_fk": {
  183. "name": "classes_period_id_periods_id_fk",
  184. "tableFrom": "classes",
  185. "tableTo": "periods",
  186. "columnsFrom": [
  187. "period_id"
  188. ],
  189. "columnsTo": [
  190. "id"
  191. ],
  192. "onDelete": "no action",
  193. "onUpdate": "no action"
  194. }
  195. },
  196. "compositePrimaryKeys": {},
  197. "uniqueConstraints": {
  198. "classes_code_unique": {
  199. "name": "classes_code_unique",
  200. "nullsNotDistinct": false,
  201. "columns": [
  202. "code"
  203. ]
  204. }
  205. },
  206. "policies": {},
  207. "checkConstraints": {},
  208. "isRLSEnabled": false
  209. },
  210. "public.partials": {
  211. "name": "partials",
  212. "schema": "",
  213. "columns": {
  214. "id": {
  215. "name": "id",
  216. "type": "uuid",
  217. "primaryKey": true,
  218. "notNull": true,
  219. "default": "gen_random_uuid()"
  220. },
  221. "name": {
  222. "name": "name",
  223. "type": "varchar(100)",
  224. "primaryKey": false,
  225. "notNull": true
  226. },
  227. "period_id": {
  228. "name": "period_id",
  229. "type": "uuid",
  230. "primaryKey": false,
  231. "notNull": false
  232. },
  233. "is_active": {
  234. "name": "is_active",
  235. "type": "boolean",
  236. "primaryKey": false,
  237. "notNull": false,
  238. "default": true
  239. },
  240. "created_at": {
  241. "name": "created_at",
  242. "type": "timestamp",
  243. "primaryKey": false,
  244. "notNull": false,
  245. "default": "now()"
  246. },
  247. "updated_at": {
  248. "name": "updated_at",
  249. "type": "timestamp",
  250. "primaryKey": false,
  251. "notNull": false,
  252. "default": "now()"
  253. }
  254. },
  255. "indexes": {},
  256. "foreignKeys": {
  257. "partials_period_id_periods_id_fk": {
  258. "name": "partials_period_id_periods_id_fk",
  259. "tableFrom": "partials",
  260. "tableTo": "periods",
  261. "columnsFrom": [
  262. "period_id"
  263. ],
  264. "columnsTo": [
  265. "id"
  266. ],
  267. "onDelete": "no action",
  268. "onUpdate": "no action"
  269. }
  270. },
  271. "compositePrimaryKeys": {},
  272. "uniqueConstraints": {},
  273. "policies": {},
  274. "checkConstraints": {},
  275. "isRLSEnabled": false
  276. },
  277. "public.periods": {
  278. "name": "periods",
  279. "schema": "",
  280. "columns": {
  281. "id": {
  282. "name": "id",
  283. "type": "uuid",
  284. "primaryKey": true,
  285. "notNull": true,
  286. "default": "gen_random_uuid()"
  287. },
  288. "name": {
  289. "name": "name",
  290. "type": "varchar(100)",
  291. "primaryKey": false,
  292. "notNull": true
  293. },
  294. "start_date": {
  295. "name": "start_date",
  296. "type": "date",
  297. "primaryKey": false,
  298. "notNull": true
  299. },
  300. "end_date": {
  301. "name": "end_date",
  302. "type": "date",
  303. "primaryKey": false,
  304. "notNull": true
  305. },
  306. "is_active": {
  307. "name": "is_active",
  308. "type": "boolean",
  309. "primaryKey": false,
  310. "notNull": false,
  311. "default": true
  312. },
  313. "created_at": {
  314. "name": "created_at",
  315. "type": "timestamp",
  316. "primaryKey": false,
  317. "notNull": false,
  318. "default": "now()"
  319. },
  320. "updated_at": {
  321. "name": "updated_at",
  322. "type": "timestamp",
  323. "primaryKey": false,
  324. "notNull": false,
  325. "default": "now()"
  326. }
  327. },
  328. "indexes": {},
  329. "foreignKeys": {},
  330. "compositePrimaryKeys": {},
  331. "uniqueConstraints": {},
  332. "policies": {},
  333. "checkConstraints": {},
  334. "isRLSEnabled": false
  335. },
  336. "public.sections": {
  337. "name": "sections",
  338. "schema": "",
  339. "columns": {
  340. "id": {
  341. "name": "id",
  342. "type": "uuid",
  343. "primaryKey": true,
  344. "notNull": true,
  345. "default": "gen_random_uuid()"
  346. },
  347. "name": {
  348. "name": "name",
  349. "type": "varchar(50)",
  350. "primaryKey": false,
  351. "notNull": true
  352. },
  353. "class_id": {
  354. "name": "class_id",
  355. "type": "uuid",
  356. "primaryKey": false,
  357. "notNull": false
  358. },
  359. "is_active": {
  360. "name": "is_active",
  361. "type": "boolean",
  362. "primaryKey": false,
  363. "notNull": false,
  364. "default": true
  365. },
  366. "created_at": {
  367. "name": "created_at",
  368. "type": "timestamp",
  369. "primaryKey": false,
  370. "notNull": false,
  371. "default": "now()"
  372. },
  373. "updated_at": {
  374. "name": "updated_at",
  375. "type": "timestamp",
  376. "primaryKey": false,
  377. "notNull": false,
  378. "default": "now()"
  379. }
  380. },
  381. "indexes": {},
  382. "foreignKeys": {
  383. "sections_class_id_classes_id_fk": {
  384. "name": "sections_class_id_classes_id_fk",
  385. "tableFrom": "sections",
  386. "tableTo": "classes",
  387. "columnsFrom": [
  388. "class_id"
  389. ],
  390. "columnsTo": [
  391. "id"
  392. ],
  393. "onDelete": "no action",
  394. "onUpdate": "no action"
  395. }
  396. },
  397. "compositePrimaryKeys": {},
  398. "uniqueConstraints": {},
  399. "policies": {},
  400. "checkConstraints": {},
  401. "isRLSEnabled": false
  402. },
  403. "public.student_enrollments": {
  404. "name": "student_enrollments",
  405. "schema": "",
  406. "columns": {
  407. "id": {
  408. "name": "id",
  409. "type": "uuid",
  410. "primaryKey": true,
  411. "notNull": true,
  412. "default": "gen_random_uuid()"
  413. },
  414. "student_id": {
  415. "name": "student_id",
  416. "type": "uuid",
  417. "primaryKey": false,
  418. "notNull": false
  419. },
  420. "class_id": {
  421. "name": "class_id",
  422. "type": "uuid",
  423. "primaryKey": false,
  424. "notNull": false
  425. },
  426. "section_id": {
  427. "name": "section_id",
  428. "type": "uuid",
  429. "primaryKey": false,
  430. "notNull": false
  431. },
  432. "is_active": {
  433. "name": "is_active",
  434. "type": "boolean",
  435. "primaryKey": false,
  436. "notNull": false,
  437. "default": true
  438. },
  439. "created_at": {
  440. "name": "created_at",
  441. "type": "timestamp",
  442. "primaryKey": false,
  443. "notNull": false,
  444. "default": "now()"
  445. }
  446. },
  447. "indexes": {},
  448. "foreignKeys": {
  449. "student_enrollments_student_id_users_id_fk": {
  450. "name": "student_enrollments_student_id_users_id_fk",
  451. "tableFrom": "student_enrollments",
  452. "tableTo": "users",
  453. "columnsFrom": [
  454. "student_id"
  455. ],
  456. "columnsTo": [
  457. "id"
  458. ],
  459. "onDelete": "no action",
  460. "onUpdate": "no action"
  461. },
  462. "student_enrollments_class_id_classes_id_fk": {
  463. "name": "student_enrollments_class_id_classes_id_fk",
  464. "tableFrom": "student_enrollments",
  465. "tableTo": "classes",
  466. "columnsFrom": [
  467. "class_id"
  468. ],
  469. "columnsTo": [
  470. "id"
  471. ],
  472. "onDelete": "no action",
  473. "onUpdate": "no action"
  474. },
  475. "student_enrollments_section_id_sections_id_fk": {
  476. "name": "student_enrollments_section_id_sections_id_fk",
  477. "tableFrom": "student_enrollments",
  478. "tableTo": "sections",
  479. "columnsFrom": [
  480. "section_id"
  481. ],
  482. "columnsTo": [
  483. "id"
  484. ],
  485. "onDelete": "no action",
  486. "onUpdate": "no action"
  487. }
  488. },
  489. "compositePrimaryKeys": {},
  490. "uniqueConstraints": {},
  491. "policies": {},
  492. "checkConstraints": {},
  493. "isRLSEnabled": false
  494. },
  495. "public.teacher_assignments": {
  496. "name": "teacher_assignments",
  497. "schema": "",
  498. "columns": {
  499. "id": {
  500. "name": "id",
  501. "type": "uuid",
  502. "primaryKey": true,
  503. "notNull": true,
  504. "default": "gen_random_uuid()"
  505. },
  506. "teacher_id": {
  507. "name": "teacher_id",
  508. "type": "uuid",
  509. "primaryKey": false,
  510. "notNull": false
  511. },
  512. "class_id": {
  513. "name": "class_id",
  514. "type": "uuid",
  515. "primaryKey": false,
  516. "notNull": false
  517. },
  518. "section_id": {
  519. "name": "section_id",
  520. "type": "uuid",
  521. "primaryKey": false,
  522. "notNull": false
  523. },
  524. "is_active": {
  525. "name": "is_active",
  526. "type": "boolean",
  527. "primaryKey": false,
  528. "notNull": false,
  529. "default": true
  530. },
  531. "created_at": {
  532. "name": "created_at",
  533. "type": "timestamp",
  534. "primaryKey": false,
  535. "notNull": false,
  536. "default": "now()"
  537. }
  538. },
  539. "indexes": {},
  540. "foreignKeys": {
  541. "teacher_assignments_teacher_id_users_id_fk": {
  542. "name": "teacher_assignments_teacher_id_users_id_fk",
  543. "tableFrom": "teacher_assignments",
  544. "tableTo": "users",
  545. "columnsFrom": [
  546. "teacher_id"
  547. ],
  548. "columnsTo": [
  549. "id"
  550. ],
  551. "onDelete": "no action",
  552. "onUpdate": "no action"
  553. },
  554. "teacher_assignments_class_id_classes_id_fk": {
  555. "name": "teacher_assignments_class_id_classes_id_fk",
  556. "tableFrom": "teacher_assignments",
  557. "tableTo": "classes",
  558. "columnsFrom": [
  559. "class_id"
  560. ],
  561. "columnsTo": [
  562. "id"
  563. ],
  564. "onDelete": "no action",
  565. "onUpdate": "no action"
  566. },
  567. "teacher_assignments_section_id_sections_id_fk": {
  568. "name": "teacher_assignments_section_id_sections_id_fk",
  569. "tableFrom": "teacher_assignments",
  570. "tableTo": "sections",
  571. "columnsFrom": [
  572. "section_id"
  573. ],
  574. "columnsTo": [
  575. "id"
  576. ],
  577. "onDelete": "no action",
  578. "onUpdate": "no action"
  579. }
  580. },
  581. "compositePrimaryKeys": {},
  582. "uniqueConstraints": {},
  583. "policies": {},
  584. "checkConstraints": {},
  585. "isRLSEnabled": false
  586. },
  587. "public.users": {
  588. "name": "users",
  589. "schema": "",
  590. "columns": {
  591. "id": {
  592. "name": "id",
  593. "type": "uuid",
  594. "primaryKey": true,
  595. "notNull": true,
  596. "default": "gen_random_uuid()"
  597. },
  598. "email": {
  599. "name": "email",
  600. "type": "varchar(255)",
  601. "primaryKey": false,
  602. "notNull": true
  603. },
  604. "password": {
  605. "name": "password",
  606. "type": "text",
  607. "primaryKey": false,
  608. "notNull": true
  609. },
  610. "first_name": {
  611. "name": "first_name",
  612. "type": "varchar(100)",
  613. "primaryKey": false,
  614. "notNull": true
  615. },
  616. "last_name": {
  617. "name": "last_name",
  618. "type": "varchar(100)",
  619. "primaryKey": false,
  620. "notNull": true
  621. },
  622. "cedula": {
  623. "name": "cedula",
  624. "type": "varchar(20)",
  625. "primaryKey": false,
  626. "notNull": true
  627. },
  628. "phone": {
  629. "name": "phone",
  630. "type": "varchar(20)",
  631. "primaryKey": false,
  632. "notNull": false
  633. },
  634. "role": {
  635. "name": "role",
  636. "type": "varchar(20)",
  637. "primaryKey": false,
  638. "notNull": true
  639. },
  640. "admission_number": {
  641. "name": "admission_number",
  642. "type": "varchar(50)",
  643. "primaryKey": false,
  644. "notNull": false
  645. },
  646. "is_active": {
  647. "name": "is_active",
  648. "type": "boolean",
  649. "primaryKey": false,
  650. "notNull": false,
  651. "default": true
  652. },
  653. "created_at": {
  654. "name": "created_at",
  655. "type": "timestamp",
  656. "primaryKey": false,
  657. "notNull": false,
  658. "default": "now()"
  659. },
  660. "updated_at": {
  661. "name": "updated_at",
  662. "type": "timestamp",
  663. "primaryKey": false,
  664. "notNull": false,
  665. "default": "now()"
  666. }
  667. },
  668. "indexes": {},
  669. "foreignKeys": {},
  670. "compositePrimaryKeys": {},
  671. "uniqueConstraints": {
  672. "users_email_unique": {
  673. "name": "users_email_unique",
  674. "nullsNotDistinct": false,
  675. "columns": [
  676. "email"
  677. ]
  678. },
  679. "users_cedula_unique": {
  680. "name": "users_cedula_unique",
  681. "nullsNotDistinct": false,
  682. "columns": [
  683. "cedula"
  684. ]
  685. }
  686. },
  687. "policies": {},
  688. "checkConstraints": {},
  689. "isRLSEnabled": false
  690. }
  691. },
  692. "enums": {},
  693. "schemas": {},
  694. "sequences": {},
  695. "roles": {},
  696. "policies": {},
  697. "views": {},
  698. "_meta": {
  699. "columns": {},
  700. "schemas": {},
  701. "tables": {}
  702. }
  703. }