1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <databaseChangeLog
3+ xmlns =" http://www.liquibase.org/xml/ns/dbchangelog"
4+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5+ xsi : schemaLocation =" http://www.liquibase.org/xml/ns/dbchangelog
6+ http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-5.0.xsd"
7+ objectQuotingStrategy =" QUOTE_ONLY_RESERVED_WORDS" >
8+ <changeSet id =" 1765233730034-1" author =" Cathy" >
9+ <createTable tableName =" participations" >
10+ <column name =" team_participation_id" type =" UUID" >
11+ <constraints nullable =" false" primaryKey =" true" primaryKeyName =" pk_participations" />
12+ </column >
13+ <column name =" artemis_participation_id" type =" BIGINT" >
14+ <constraints nullable =" false" />
15+ </column >
16+ <column name =" artemis_team_id" type =" BIGINT" />
17+ <column name =" tutor_id" type =" UUID" />
18+ <column name =" name" type =" VARCHAR(255)" />
19+ <column name =" short_name" type =" VARCHAR(255)" />
20+ <column name =" repository_url" type =" VARCHAR(255)" >
21+ <constraints nullable =" false" />
22+ </column >
23+ <column name =" submission_count" type =" INT" />
24+ </createTable >
25+ </changeSet >
26+ <changeSet id =" 1765233730034-2" author =" Cathy" >
27+ <createTable tableName =" students" >
28+ <column name =" student_id" type =" UUID" >
29+ <constraints nullable =" false" primaryKey =" true" primaryKeyName =" pk_students" />
30+ </column >
31+ <column name =" artemis_student_id" type =" BIGINT" />
32+ <column name =" login" type =" VARCHAR(255)" />
33+ <column name =" name" type =" VARCHAR(255)" />
34+ <column name =" email" type =" VARCHAR(255)" />
35+ <column name =" commit_count" type =" INT" />
36+ <column name =" lines_added" type =" INT" />
37+ <column name =" lines_deleted" type =" INT" />
38+ <column name =" lines_changed" type =" INT" />
39+ <column name =" team_participation_id" type =" UUID" />
40+ </createTable >
41+ </changeSet >
42+ <changeSet id =" 1765233730034-3" author =" Cathy" >
43+ <createTable tableName =" teamanalysis" >
44+ <column name =" team_analysis_id" type =" UUID" >
45+ <constraints nullable =" false" primaryKey =" true" primaryKeyName =" pk_teamanalysis" />
46+ </column >
47+ </createTable >
48+ </changeSet >
49+ <changeSet id =" 1765233730034-4" author =" Cathy" >
50+ <createTable tableName =" teamrepository" >
51+ <column name =" team_repository_id" type =" UUID" >
52+ <constraints nullable =" false" primaryKey =" true" primaryKeyName =" pk_teamrepository" />
53+ </column >
54+ <column name =" participation_id" type =" UUID" >
55+ <constraints nullable =" false" />
56+ </column >
57+ <column name =" local_path" type =" VARCHAR(255)" />
58+ <column name =" is_cloned" type =" BOOLEAN" />
59+ <column name =" error" type =" VARCHAR(255)" />
60+ </createTable >
61+ </changeSet >
62+ <changeSet id =" 1765233730034-5" author =" Cathy" >
63+ <createTable tableName =" tutors" >
64+ <column name =" tutor_id" type =" UUID" >
65+ <constraints nullable =" false" primaryKey =" true" primaryKeyName =" pk_tutors" />
66+ </column >
67+ <column name =" artemis_tutor_id" type =" BIGINT" />
68+ <column name =" login" type =" VARCHAR(255)" />
69+ <column name =" name" type =" VARCHAR(255)" />
70+ <column name =" email" type =" VARCHAR(255)" />
71+ </createTable >
72+ </changeSet >
73+ <changeSet id =" 1765233730034-6" author =" Cathy" >
74+ <createTable tableName =" user" >
75+ <column name =" user_id" type =" UUID" >
76+ <constraints nullable =" false" primaryKey =" true" primaryKeyName =" pk_user" />
77+ </column >
78+ </createTable >
79+ </changeSet >
80+ <changeSet id =" 1765233730034-7" author =" Cathy" >
81+ <createTable tableName =" vcslogs" >
82+ <column name =" vcs_log_id" type =" UUID" >
83+ <constraints nullable =" false" primaryKey =" true" primaryKeyName =" pk_vcslogs" />
84+ </column >
85+ <column name =" team_repository_id" type =" UUID" >
86+ <constraints nullable =" false" />
87+ </column >
88+ <column name =" commit_hash" type =" VARCHAR(255)" />
89+ <column name =" email" type =" VARCHAR(255)" />
90+ </createTable >
91+ </changeSet >
92+ <changeSet id =" 1765233730034-8" author =" Cathy" >
93+ <addUniqueConstraint columnNames =" participation_id" constraintName =" uc_teamrepository_participation"
94+ tableName =" teamrepository" />
95+ </changeSet >
96+ <changeSet id =" 1765233730034-9" author =" Cathy" >
97+ <addForeignKeyConstraint baseColumnNames =" tutor_id" baseTableName =" participations"
98+ constraintName =" FK_PARTICIPATIONS_ON_TUTOR" referencedColumnNames =" tutor_id"
99+ referencedTableName =" tutors" />
100+ </changeSet >
101+ <changeSet id =" 1765233730034-10" author =" Cathy" >
102+ <addForeignKeyConstraint baseColumnNames =" team_participation_id" baseTableName =" students"
103+ constraintName =" FK_STUDENTS_ON_TEAMPARTICIPATION"
104+ referencedColumnNames =" team_participation_id" referencedTableName =" participations" />
105+ </changeSet >
106+ <changeSet id =" 1765233730034-11" author =" Cathy" >
107+ <addForeignKeyConstraint baseColumnNames =" participation_id" baseTableName =" teamrepository"
108+ constraintName =" FK_TEAMREPOSITORY_ON_PARTICIPATION"
109+ referencedColumnNames =" team_participation_id" referencedTableName =" participations" />
110+ </changeSet >
111+ <changeSet id =" 1765233730034-12" author =" Cathy" >
112+ <addForeignKeyConstraint baseColumnNames =" team_repository_id" baseTableName =" vcslogs"
113+ constraintName =" FK_VCSLOGS_ON_TEAM_REPOSITORY"
114+ referencedColumnNames =" team_repository_id" referencedTableName =" teamrepository" />
115+ </changeSet >
116+
117+ </databaseChangeLog >
0 commit comments