Skip to content

Commit 34d888d

Browse files
committed
Make the db column name snake case
1 parent 4cc8836 commit 34d888d

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

server/src/main/java/com/objectcomputing/checkins/services/memberprofile/MemberProfile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public class MemberProfile {
155155
@TypeDef(type = DataType.DATE, converter = LocalDateConverter.class)
156156
private LocalDate lastSeen;
157157

158-
@Column(name="ignorebirthday")
158+
@Column(name="ignore_birthday")
159159
@Schema(description = "flag indicating the member would like to have their birthday ignored")
160160
@Nullable
161161
private Boolean ignoreBirthday;

server/src/main/java/com/objectcomputing/checkins/services/memberprofile/MemberProfileRepository.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public interface MemberProfileRepository extends CrudRepository<MemberProfile, U
2727
"PGP_SYM_DECRYPT(cast(workEmail as bytea), '${aes.key}') as workEmail, " +
2828
"employeeId, startDate, " +
2929
"PGP_SYM_DECRYPT(cast(bioText as bytea), '${aes.key}') as bioText, " +
30-
"supervisorid, terminationDate, birthDate, voluntary, excluded, last_seen, ignoreBirthday " +
30+
"supervisorid, terminationDate, birthDate, voluntary, excluded, last_seen, ignore_birthday " +
3131
"FROM \"member_profile\" mp " +
3232
"WHERE (:workEmail IS NULL OR PGP_SYM_DECRYPT(cast(mp.workEmail as bytea), '${aes.key}') = :workEmail) ",
3333
nativeQuery = true)
@@ -44,7 +44,7 @@ public interface MemberProfileRepository extends CrudRepository<MemberProfile, U
4444
"PGP_SYM_DECRYPT(cast(workEmail as bytea), '${aes.key}') as workEmail, " +
4545
"employeeId, startDate, " +
4646
"PGP_SYM_DECRYPT(cast(bioText as bytea), '${aes.key}') as bioText, " +
47-
"supervisorid, terminationDate, birthDate, voluntary, excluded, last_seen, ignoreBirthday " +
47+
"supervisorid, terminationDate, birthDate, voluntary, excluded, last_seen, ignore_birthday " +
4848
"FROM \"member_profile\" mp " +
4949
"WHERE (:firstName IS NULL OR PGP_SYM_DECRYPT(cast(mp.firstName as bytea),'${aes.key}') = :firstName) " +
5050
"AND (:middleName IS NULL OR PGP_SYM_DECRYPT(cast(mp.middleName as bytea),'${aes.key}') = :middleName) " +
@@ -72,12 +72,12 @@ WHERE mp.id IN (:ids)""",
7272
List<String> findWorkEmailByIdIn(Set<String> ids);
7373

7474
@Query(value = "WITH RECURSIVE subordinate AS (SELECT " +
75-
"id, firstname, middlename, lastname, suffix, title, pdlid, location, workemail, employeeid, startdate, biotext, supervisorid, terminationdate, birthdate, voluntary, excluded, last_seen, ignoreBirthday, 0 as level " +
75+
"id, firstname, middlename, lastname, suffix, title, pdlid, location, workemail, employeeid, startdate, biotext, supervisorid, terminationdate, birthdate, voluntary, excluded, last_seen, ignore_birthday, 0 as level " +
7676
"FROM member_profile " +
7777
"WHERE id = :id and terminationdate is NULL " +
7878
" UNION ALL " +
7979
"SELECT " +
80-
"e.id, e.firstname, e.middlename, e.lastname, e.suffix, e.title, e.pdlid, e.location, e.workemail, e.employeeid, e.startdate, e.biotext, e.supervisorid, e.terminationdate, e.birthdate, e.voluntary, e.excluded, e.last_seen, e.ignoreBirthday, level + 1 " +
80+
"e.id, e.firstname, e.middlename, e.lastname, e.suffix, e.title, e.pdlid, e.location, e.workemail, e.employeeid, e.startdate, e.biotext, e.supervisorid, e.terminationdate, e.birthdate, e.voluntary, e.excluded, e.last_seen, e.ignore_birthday, level + 1 " +
8181
"FROM member_profile e " +
8282
"JOIN subordinate s " +
8383
"ON s.supervisorid = e.id " +
@@ -96,7 +96,7 @@ WHERE mp.id IN (:ids)""",
9696
"PGP_SYM_DECRYPT(cast(s.workemail as bytea), '${aes.key}') as workemail, " +
9797
"s.employeeid, s.startdate, " +
9898
"PGP_SYM_DECRYPT(cast(s.biotext as bytea), '${aes.key}') as biotext, " +
99-
"s.supervisorid, s.terminationdate, s.birthdate, s.voluntary, s.excluded, s.last_seen, s.ignoreBirthday, " +
99+
"s.supervisorid, s.terminationdate, s.birthdate, s.voluntary, s.excluded, s.last_seen, s.ignore_birthday, " +
100100
"s.level " +
101101
"FROM subordinate s " +
102102
"WHERE s.id <> :id " +
@@ -106,11 +106,11 @@ WHERE mp.id IN (:ids)""",
106106
@Query(
107107
value = """
108108
WITH RECURSIVE subordinate AS (
109-
SELECT id, firstname, middlename, lastname, suffix, title, pdlid, location, workemail, employeeid, startdate, biotext, supervisorid, terminationdate, birthdate, voluntary, excluded, last_seen, ignoreBirthday, 0 as level
109+
SELECT id, firstname, middlename, lastname, suffix, title, pdlid, location, workemail, employeeid, startdate, biotext, supervisorid, terminationdate, birthdate, voluntary, excluded, last_seen, ignore_birthday, 0 as level
110110
FROM member_profile
111111
WHERE id = :id and terminationdate is NULL
112112
UNION ALL
113-
SELECT e.id, e.firstname, e.middlename, e.lastname, e.suffix, e.title, e.pdlid, e.location, e.workemail, e.employeeid, e.startdate, e.biotext, e.supervisorid, e.terminationdate, e.birthdate, e.voluntary, e.excluded, e.last_seen, e.ignoreBirthday, level + 1
113+
SELECT e.id, e.firstname, e.middlename, e.lastname, e.suffix, e.title, e.pdlid, e.location, e.workemail, e.employeeid, e.startdate, e.biotext, e.supervisorid, e.terminationdate, e.birthdate, e.voluntary, e.excluded, e.last_seen, e.ignore_birthday, level + 1
114114
FROM member_profile AS e JOIN subordinate AS s ON s.id = e.supervisorid
115115
WHERE e.terminationdate is NULL
116116
)
@@ -126,7 +126,7 @@ WITH RECURSIVE subordinate AS (
126126
PGP_SYM_DECRYPT(cast(s.workemail as bytea), '${aes.key}') as workemail,
127127
s.employeeid, s.startdate,
128128
PGP_SYM_DECRYPT(cast(s.biotext as bytea), '${aes.key}') as biotext,
129-
s.supervisorid, s.terminationdate, s.birthdate, s.voluntary, s.excluded, s.last_seen, s.ignoreBirthday,
129+
s.supervisorid, s.terminationdate, s.birthdate, s.voluntary, s.excluded, s.last_seen, s.ignore_birthday,
130130
s.level
131131
FROM subordinate s
132132
WHERE s.id <> :id
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ALTER TABLE member_profile ADD column ignoreBirthday boolean;
1+
ALTER TABLE member_profile ADD column ignore_birthday boolean;

0 commit comments

Comments
 (0)