-
-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathjpa-schema-export.sql
More file actions
975 lines (797 loc) · 27.5 KB
/
jpa-schema-export.sql
File metadata and controls
975 lines (797 loc) · 27.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
drop table if exists Application;
drop table if exists Application_literacySkills;
drop table if exists Application_numeracySkills;
drop table if exists ApplicationVersion;
drop table if exists Contributor;
drop table if exists Contributor_roles;
drop table if exists DbMigration;
drop table if exists Device;
drop table if exists Emoji;
drop table if exists Emoji_Word;
drop table if exists Image;
drop table if exists Image_Letter;
drop table if exists Image_literacySkills;
drop table if exists Image_Number;
drop table if exists Image_numeracySkills;
drop table if exists Image_Word;
drop table if exists ImageContributionEvent;
drop table if exists Letter;
drop table if exists LetterContributionEvent;
drop table if exists LetterSound;
drop table if exists LetterSound_Letter;
drop table if exists LetterSound_Sound;
drop table if exists LetterSoundContributionEvent;
drop table if exists LetterSoundLearningEvent;
drop table if exists LetterSoundPeerReviewEvent;
drop table if exists Number;
drop table if exists Number_Word;
drop table if exists NumberContributionEvent;
drop table if exists NumberPeerReviewEvent;
drop table if exists Sound;
drop table if exists SoundContributionEvent;
drop table if exists StoryBook;
drop table if exists StoryBookChapter;
drop table if exists StoryBookContributionEvent;
drop table if exists StoryBookLearningEvent;
drop table if exists StoryBookParagraph;
drop table if exists StoryBookParagraph_Word;
drop table if exists StoryBookPeerReviewEvent;
drop table if exists Syllable;
drop table if exists Syllable_Sound;
drop table if exists Video;
drop table if exists Video_Letter;
drop table if exists Video_literacySkills;
drop table if exists Video_Number;
drop table if exists Video_numeracySkills;
drop table if exists Video_Word;
drop table if exists VideoLearningEvent;
drop table if exists Word;
drop table if exists Word_LetterSound;
drop table if exists WordContributionEvent;
drop table if exists WordLearningEvent;
drop table if exists WordPeerReviewEvent;
create table Application (
id bigint not null auto_increment,
applicationStatus varchar(255),
infrastructural bit not null,
packageName varchar(255),
repoName varchar(255),
contributor_id bigint,
primary key (id)
) type=MyISAM;
create table Application_literacySkills (
Application_id bigint not null,
literacySkills varchar(255)
) type=MyISAM;
create table Application_numeracySkills (
Application_id bigint not null,
numeracySkills varchar(255)
) type=MyISAM;
create table ApplicationVersion (
id bigint not null auto_increment,
checksumMd5 varchar(255),
contentType varchar(255),
fileSizeInKb integer,
icon mediumblob,
label varchar(255),
minSdkVersion integer,
timeUploaded datetime,
versionCode integer,
versionName varchar(255),
application_id bigint,
contributor_id bigint,
primary key (id)
) type=MyISAM;
create table Contributor (
id bigint not null auto_increment,
email varchar(255),
firstName varchar(255),
imageUrl varchar(255),
lastName varchar(255),
motivation text,
providerIdDiscord varchar(255),
providerIdGitHub varchar(255),
providerIdWeb3 varchar(42),
registrationTime datetime,
usernameDiscord varchar(255),
usernameGitHub varchar(255),
primary key (id)
) type=MyISAM;
create table Contributor_roles (
Contributor_id bigint not null,
roles varchar(255)
) type=MyISAM;
create table DbMigration (
id bigint not null auto_increment,
calendar datetime,
script text,
version integer,
primary key (id)
) type=MyISAM;
create table Device (
id bigint not null auto_increment,
androidId varchar(255),
deviceManufacturer varchar(255),
deviceModel varchar(255),
deviceSerial varchar(255),
osVersion integer,
remoteAddress varchar(255),
timeRegistered datetime,
primary key (id)
) type=MyISAM;
create table Emoji (
id bigint not null auto_increment,
contentStatus varchar(255),
peerReviewStatus varchar(255),
revisionNumber integer,
timeLastUpdate datetime,
usageCount integer,
glyph varchar(4),
unicodeEmojiVersion float(53),
unicodeVersion float(53),
primary key (id)
) type=MyISAM;
create table Emoji_Word (
Emoji_id bigint not null,
words_id bigint not null,
primary key (Emoji_id, words_id)
) type=MyISAM;
create table Image (
id bigint not null auto_increment,
contentStatus varchar(255),
peerReviewStatus varchar(255),
revisionNumber integer,
timeLastUpdate datetime,
usageCount integer,
attributionUrl text,
contentLicense varchar(255),
contentType varchar(255),
checksumGitHub varchar(255),
checksumMd5 varchar(255),
dominantColor varchar(255),
fileSize integer,
imageFormat varchar(255),
title varchar(255),
primary key (id)
) type=MyISAM;
create table Image_Letter (
Image_id bigint not null,
letters_id bigint not null,
primary key (Image_id, letters_id)
) type=MyISAM;
create table Image_literacySkills (
Image_id bigint not null,
literacySkills varchar(255)
) type=MyISAM;
create table Image_Number (
Image_id bigint not null,
numbers_id bigint not null,
primary key (Image_id, numbers_id)
) type=MyISAM;
create table Image_numeracySkills (
Image_id bigint not null,
numeracySkills varchar(255)
) type=MyISAM;
create table Image_Word (
Image_id bigint not null,
words_id bigint not null,
primary key (Image_id, words_id)
) type=MyISAM;
create table ImageContributionEvent (
id bigint not null auto_increment,
comment text,
revisionNumber integer,
timestamp datetime,
contributor_id bigint,
image_id bigint,
primary key (id)
) type=MyISAM;
create table Letter (
id bigint not null auto_increment,
contentStatus varchar(255),
peerReviewStatus varchar(255),
revisionNumber integer,
timeLastUpdate datetime,
usageCount integer,
diacritic bit not null,
text varchar(3),
primary key (id)
) type=MyISAM;
create table LetterContributionEvent (
id bigint not null auto_increment,
comment text,
revisionNumber integer,
timestamp datetime,
contributor_id bigint,
letter_id bigint,
primary key (id)
) type=MyISAM;
create table LetterSound (
id bigint not null auto_increment,
contentStatus varchar(255),
peerReviewStatus varchar(255),
revisionNumber integer,
timeLastUpdate datetime,
usageCount integer,
primary key (id)
) type=MyISAM;
create table LetterSound_Letter (
LetterSound_id bigint not null,
letters_id bigint not null,
letters_ORDER integer not null,
primary key (LetterSound_id, letters_ORDER)
) type=MyISAM;
create table LetterSound_Sound (
LetterSound_id bigint not null,
sounds_id bigint not null,
sounds_ORDER integer not null,
primary key (LetterSound_id, sounds_ORDER)
) type=MyISAM;
create table LetterSoundContributionEvent (
id bigint not null auto_increment,
comment text,
revisionNumber integer,
timestamp datetime,
contributor_id bigint,
letterSound_id bigint,
primary key (id)
) type=MyISAM;
create table LetterSoundLearningEvent (
id bigint not null auto_increment,
additionalData text,
androidId varchar(255),
learningEventType varchar(255),
packageName varchar(255),
timestamp datetime,
letterSoundId bigint,
application_id bigint,
primary key (id)
) type=MyISAM;
create table LetterSoundPeerReviewEvent (
id bigint not null auto_increment,
approved bit,
comment text,
timestamp datetime,
contributor_id bigint,
letterSoundContributionEvent_id bigint,
primary key (id)
) type=MyISAM;
create table Number (
id bigint not null auto_increment,
contentStatus varchar(255),
peerReviewStatus varchar(255),
revisionNumber integer,
timeLastUpdate datetime,
usageCount integer,
symbol varchar(255),
value integer,
primary key (id)
) type=MyISAM;
create table Number_Word (
Number_id bigint not null,
words_id bigint not null,
words_ORDER integer not null,
primary key (Number_id, words_ORDER)
) type=MyISAM;
create table NumberContributionEvent (
id bigint not null auto_increment,
comment text,
revisionNumber integer,
timestamp datetime,
contributor_id bigint,
number_id bigint,
primary key (id)
) type=MyISAM;
create table NumberPeerReviewEvent (
id bigint not null auto_increment,
approved bit,
comment text,
timestamp datetime,
contributor_id bigint,
numberContributionEvent_id bigint,
primary key (id)
) type=MyISAM;
create table Sound (
id bigint not null auto_increment,
contentStatus varchar(255),
peerReviewStatus varchar(255),
revisionNumber integer,
timeLastUpdate datetime,
usageCount integer,
consonantPlace varchar(255),
consonantType varchar(255),
consonantVoicing varchar(255),
diacritic bit not null,
lipRounding varchar(255),
soundType varchar(255),
valueIpa varchar(3),
valueSampa varchar(5),
vowelFrontness varchar(255),
vowelHeight varchar(255),
vowelLength varchar(255),
primary key (id)
) type=MyISAM;
create table SoundContributionEvent (
id bigint not null auto_increment,
comment text,
revisionNumber integer,
timestamp datetime,
contributor_id bigint,
sound_id bigint,
primary key (id)
) type=MyISAM;
create table StoryBook (
id bigint not null auto_increment,
contentStatus varchar(255),
peerReviewStatus varchar(255),
revisionNumber integer,
timeLastUpdate datetime,
usageCount integer,
attributionUrl text,
contentLicense varchar(255),
description text,
readingLevel varchar(255),
title varchar(255),
coverImage_id bigint,
primary key (id)
) type=MyISAM;
create table StoryBookChapter (
id bigint not null auto_increment,
sortOrder integer,
image_id bigint,
storyBook_id bigint,
primary key (id)
) type=MyISAM;
create table StoryBookContributionEvent (
id bigint not null auto_increment,
comment text,
revisionNumber integer,
timestamp datetime,
paragraphTextAfter text,
paragraphTextBefore text,
contributor_id bigint,
storyBook_id bigint,
primary key (id)
) type=MyISAM;
create table StoryBookLearningEvent (
id bigint not null auto_increment,
additionalData text,
androidId varchar(255),
learningEventType varchar(255),
packageName varchar(255),
timestamp datetime,
storyBookId bigint,
storyBookTitle varchar(255),
application_id bigint,
storyBook_id bigint,
primary key (id)
) type=MyISAM;
create table StoryBookParagraph (
id bigint not null auto_increment,
originalText text,
sortOrder integer,
storyBookChapter_id bigint,
primary key (id)
) type=MyISAM;
create table StoryBookParagraph_Word (
StoryBookParagraph_id bigint not null,
words_id bigint not null,
words_ORDER integer not null,
primary key (StoryBookParagraph_id, words_ORDER)
) type=MyISAM;
create table StoryBookPeerReviewEvent (
id bigint not null auto_increment,
approved bit,
comment text,
timestamp datetime,
contributor_id bigint,
storyBookContributionEvent_id bigint,
primary key (id)
) type=MyISAM;
create table Syllable (
id bigint not null auto_increment,
contentStatus varchar(255),
peerReviewStatus varchar(255),
revisionNumber integer,
timeLastUpdate datetime,
usageCount integer,
text varchar(255),
primary key (id)
) type=MyISAM;
create table Syllable_Sound (
Syllable_id bigint not null,
sounds_id bigint not null,
sounds_ORDER integer not null,
primary key (Syllable_id, sounds_ORDER)
) type=MyISAM;
create table Video (
id bigint not null auto_increment,
contentStatus varchar(255),
peerReviewStatus varchar(255),
revisionNumber integer,
timeLastUpdate datetime,
usageCount integer,
attributionUrl text,
contentLicense varchar(255),
contentType varchar(255),
checksumGitHub varchar(255),
checksumMd5 varchar(255),
fileSize integer,
thumbnail mediumblob,
title varchar(255),
videoFormat varchar(255),
primary key (id)
) type=MyISAM;
create table Video_Letter (
Video_id bigint not null,
letters_id bigint not null,
primary key (Video_id, letters_id)
) type=MyISAM;
create table Video_literacySkills (
Video_id bigint not null,
literacySkills varchar(255)
) type=MyISAM;
create table Video_Number (
Video_id bigint not null,
numbers_id bigint not null,
primary key (Video_id, numbers_id)
) type=MyISAM;
create table Video_numeracySkills (
Video_id bigint not null,
numeracySkills varchar(255)
) type=MyISAM;
create table Video_Word (
Video_id bigint not null,
words_id bigint not null,
primary key (Video_id, words_id)
) type=MyISAM;
create table VideoLearningEvent (
id bigint not null auto_increment,
additionalData text,
androidId varchar(255),
learningEventType varchar(255),
packageName varchar(255),
timestamp datetime,
videoId bigint,
videoTitle varchar(255),
application_id bigint,
video_id bigint,
primary key (id)
) type=MyISAM;
create table Word (
id bigint not null auto_increment,
contentStatus varchar(255),
peerReviewStatus varchar(255),
revisionNumber integer,
timeLastUpdate datetime,
usageCount integer,
spellingConsistency varchar(255),
text varchar(255),
wordType varchar(255),
rootWord_id bigint,
primary key (id)
) type=MyISAM;
create table Word_LetterSound (
Word_id bigint not null,
letterSounds_id bigint not null,
letterSounds_ORDER integer not null,
primary key (Word_id, letterSounds_ORDER)
) type=MyISAM;
create table WordContributionEvent (
id bigint not null auto_increment,
comment text,
revisionNumber integer,
timestamp datetime,
contributor_id bigint,
word_id bigint,
primary key (id)
) type=MyISAM;
create table WordLearningEvent (
id bigint not null auto_increment,
additionalData text,
androidId varchar(255),
learningEventType varchar(255),
packageName varchar(255),
timestamp datetime,
wordText varchar(255),
application_id bigint,
word_id bigint,
primary key (id)
) type=MyISAM;
create table WordPeerReviewEvent (
id bigint not null auto_increment,
approved bit,
comment text,
timestamp datetime,
contributor_id bigint,
wordContributionEvent_id bigint,
primary key (id)
) type=MyISAM;
alter table Contributor
add constraint UK_se15thb3bqtr3sw28rgf1v8ia unique (email);
alter table Contributor
add constraint UK_g3my0evexejqgidmkse6suxt3 unique (providerIdWeb3);
alter table DbMigration
add constraint UK_gdl53lyf9qvi56fmbrk9nfrg9 unique (version);
alter table Device
add constraint UK_c2646199whiqrkjbht7hwyr3v unique (androidId);
alter table Application
add constraint FKn1pft600om9qs7dn754chjk67
foreign key (contributor_id)
references Contributor (id);
alter table Application_literacySkills
add constraint FK6m0x1m1hks48tio7hdlcyumqq
foreign key (Application_id)
references Application (id);
alter table Application_numeracySkills
add constraint FK858mh1kg9x9w8oqip0mkf53tr
foreign key (Application_id)
references Application (id);
alter table ApplicationVersion
add constraint FKf2y9evfvnfd82cot9dhk0ue54
foreign key (application_id)
references Application (id);
alter table ApplicationVersion
add constraint FKbmfakjprck5g1jlh74xpmp0j7
foreign key (contributor_id)
references Contributor (id);
alter table Contributor_roles
add constraint FKriv03x8alxet23b7b4ivk2vot
foreign key (Contributor_id)
references Contributor (id);
alter table Emoji_Word
add constraint FKbkw2j0k8qfhx43docakb9j5ve
foreign key (words_id)
references Word (id);
alter table Emoji_Word
add constraint FKlwplucw359d2d5i4yelfkwy6f
foreign key (Emoji_id)
references Emoji (id);
alter table Image_Letter
add constraint FK9pi4lblfl1s807tlif82cm5mt
foreign key (letters_id)
references Letter (id);
alter table Image_Letter
add constraint FK4gkpmcffc4upm7mrudt4clux4
foreign key (Image_id)
references Image (id);
alter table Image_literacySkills
add constraint FKase42u556a5hkq1qau359sohp
foreign key (Image_id)
references Image (id);
alter table Image_Number
add constraint FKitwj5vppcji5now11mp8icipa
foreign key (numbers_id)
references Number (id);
alter table Image_Number
add constraint FK70i88cwc0frkrx6lo2hjuav4v
foreign key (Image_id)
references Image (id);
alter table Image_numeracySkills
add constraint FKlsmoxnf75p3c9bsstqxjy39cx
foreign key (Image_id)
references Image (id);
alter table Image_Word
add constraint FKo4boxy1gphgg94k7gsyyf2gkh
foreign key (words_id)
references Word (id);
alter table Image_Word
add constraint FKm6hxhjn1og47ovf4xyt6uaqff
foreign key (Image_id)
references Image (id);
alter table ImageContributionEvent
add constraint FKlw0g62yxana6js9f7hpc4hybc
foreign key (contributor_id)
references Contributor (id);
alter table ImageContributionEvent
add constraint FK9v3p0869ivi1jeohpkn8sttr0
foreign key (image_id)
references Image (id);
alter table LetterContributionEvent
add constraint FKrrosmtv3fcec9acjayfruop5
foreign key (contributor_id)
references Contributor (id);
alter table LetterContributionEvent
add constraint FK5do5q62aj1bilg8pwmphr4ugl
foreign key (letter_id)
references Letter (id);
alter table LetterSound_Letter
add constraint FKgfio6vxgyrx52nc0so389ibi1
foreign key (letters_id)
references Letter (id);
alter table LetterSound_Letter
add constraint FKgb32dkiivg3d8owk1e6hcyu78
foreign key (LetterSound_id)
references LetterSound (id);
alter table LetterSound_Sound
add constraint FKjjypynbc4x7ij6vqsi9e0m3st
foreign key (sounds_id)
references Sound (id);
alter table LetterSound_Sound
add constraint FKtlgjcxa3jtailq62jrgq1hgl6
foreign key (LetterSound_id)
references LetterSound (id);
alter table LetterSoundContributionEvent
add constraint FK5uk320agfa13pvh52v6n6ncbs
foreign key (contributor_id)
references Contributor (id);
alter table LetterSoundContributionEvent
add constraint FKqmngc8gfw52jjv9gf9dey1urk
foreign key (letterSound_id)
references LetterSound (id);
alter table LetterSoundLearningEvent
add constraint FKdm16bp5gb29hsge3thngm1pli
foreign key (application_id)
references Application (id);
alter table LetterSoundPeerReviewEvent
add constraint FK3wapf4y5anhgnjbqna2qjyie4
foreign key (contributor_id)
references Contributor (id);
alter table LetterSoundPeerReviewEvent
add constraint FKcnsd5pxijcu7qmjxs6qr2k2p6
foreign key (letterSoundContributionEvent_id)
references LetterSoundContributionEvent (id);
alter table Number_Word
add constraint FKspo8bt34fftva3y5jac7p2no1
foreign key (words_id)
references Word (id);
alter table Number_Word
add constraint FKim83prd786jsowiyrhdf1vo59
foreign key (Number_id)
references Number (id);
alter table NumberContributionEvent
add constraint FK8tr84kkqmavan1jxfmc1pq8h6
foreign key (contributor_id)
references Contributor (id);
alter table NumberContributionEvent
add constraint FKkfyssxfqg6x1vygyhjks96m4u
foreign key (number_id)
references Number (id);
alter table NumberPeerReviewEvent
add constraint FKhcm34w6kojhaiqneed300n9p8
foreign key (contributor_id)
references Contributor (id);
alter table NumberPeerReviewEvent
add constraint FKtq7b81iqfw1dxuk79c2se2onu
foreign key (numberContributionEvent_id)
references NumberContributionEvent (id);
alter table SoundContributionEvent
add constraint FKbuah2o1ndo9kpbj39gr8tic3t
foreign key (contributor_id)
references Contributor (id);
alter table SoundContributionEvent
add constraint FK2vw08gkdxfbcp4ufji6nsuyoi
foreign key (sound_id)
references Sound (id);
alter table StoryBook
add constraint FKkwr1b53nrmjdvd874vsiql21a
foreign key (coverImage_id)
references Image (id);
alter table StoryBookChapter
add constraint FKcnlksdikth82ec6nia8tb3cps
foreign key (image_id)
references Image (id);
alter table StoryBookChapter
add constraint FKaqnew7dipgs9ffkfh2js25l1g
foreign key (storyBook_id)
references StoryBook (id);
alter table StoryBookContributionEvent
add constraint FK3s4f77htgff63dqy4diam9fc9
foreign key (contributor_id)
references Contributor (id);
alter table StoryBookContributionEvent
add constraint FKpuk0ynailkg93eiaf62tn2phy
foreign key (storyBook_id)
references StoryBook (id);
alter table StoryBookLearningEvent
add constraint FK8f7cr6xa4n3kgrmffy7crtcrn
foreign key (application_id)
references Application (id);
alter table StoryBookLearningEvent
add constraint FKi731lr5iofppbd0lod4pjoufr
foreign key (storyBook_id)
references StoryBook (id);
alter table StoryBookParagraph
add constraint FKdna2npdcgkq74v2306anb4f6s
foreign key (storyBookChapter_id)
references StoryBookChapter (id);
alter table StoryBookParagraph_Word
add constraint FKecjq9ll62036jtbwl3g9vytg8
foreign key (words_id)
references Word (id);
alter table StoryBookParagraph_Word
add constraint FK6kx5ydfx49dfl5oy44bold81k
foreign key (StoryBookParagraph_id)
references StoryBookParagraph (id);
alter table StoryBookPeerReviewEvent
add constraint FKjc6t09q4xff532a4s8jocuvs1
foreign key (contributor_id)
references Contributor (id);
alter table StoryBookPeerReviewEvent
add constraint FKe1bnu38w5m0dc0qkeuuxf4g5h
foreign key (storyBookContributionEvent_id)
references StoryBookContributionEvent (id);
alter table Syllable_Sound
add constraint FKlfp5s4xc4wi7s7fo980027tl1
foreign key (sounds_id)
references Sound (id);
alter table Syllable_Sound
add constraint FK627nj3gkx5dn4xn9g4tmnmbdx
foreign key (Syllable_id)
references Syllable (id);
alter table Video_Letter
add constraint FK426jmgm09qif0fhqke99ejl8c
foreign key (letters_id)
references Letter (id);
alter table Video_Letter
add constraint FKlmbmpg1y1jue79i9w0f3ejetp
foreign key (Video_id)
references Video (id);
alter table Video_literacySkills
add constraint FKcp7t3km7xi2wkraaugjuk5xoo
foreign key (Video_id)
references Video (id);
alter table Video_Number
add constraint FK5lrjvgqa5wnd49g6gsohlm0tg
foreign key (numbers_id)
references Number (id);
alter table Video_Number
add constraint FKr064lw8ryd35xks27348u2s9a
foreign key (Video_id)
references Video (id);
alter table Video_numeracySkills
add constraint FKt545qojkqdegjg5muf41ltk86
foreign key (Video_id)
references Video (id);
alter table Video_Word
add constraint FK2un2s9ljli58i2qkjmvdpwfc7
foreign key (words_id)
references Word (id);
alter table Video_Word
add constraint FKplswdv1whriquc00dsaxrqe0s
foreign key (Video_id)
references Video (id);
alter table VideoLearningEvent
add constraint FKoqqhe1r2epyv55g6jo79t251h
foreign key (application_id)
references Application (id);
alter table VideoLearningEvent
add constraint FK38rllate5mtlhi6fdiudffm4c
foreign key (video_id)
references Video (id);
alter table Word
add constraint FKd1ussioi3bpu2tmxm0cim5s5a
foreign key (rootWord_id)
references Word (id);
alter table Word_LetterSound
add constraint FKnxxaf27n4dfiblvkg73ewiig5
foreign key (letterSounds_id)
references LetterSound (id);
alter table Word_LetterSound
add constraint FKsx4fbojtfe17xitgiofdef23k
foreign key (Word_id)
references Word (id);
alter table WordContributionEvent
add constraint FKrsen7udud4svhc32e3rhkcmnu
foreign key (contributor_id)
references Contributor (id);
alter table WordContributionEvent
add constraint FKkwqjkxvg3rvmp1kys6fr8blwq
foreign key (word_id)
references Word (id);
alter table WordLearningEvent
add constraint FKb5jjaetgs99whlxywbi0palby
foreign key (application_id)
references Application (id);
alter table WordLearningEvent
add constraint FK221ytgbt7u8eajdics6a5sloe
foreign key (word_id)
references Word (id);
alter table WordPeerReviewEvent
add constraint FKp3i671x4kb823ayc73381gk33
foreign key (contributor_id)
references Contributor (id);
alter table WordPeerReviewEvent
add constraint FKjyi59inavblt0afri8vd3xhw1
foreign key (wordContributionEvent_id)
references WordContributionEvent (id);