Skip to content

Commit 2525ffd

Browse files
committed
rename text column in qotw_question table to TEXT
1 parent e527d9d commit 2525ffd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/net/javadiscord/javabot/systems/qotw/dao/QuestionQueueRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public List<QOTWQuestion> getQuestions(long guildId, int page, int size) throws
132132
* @throws SQLException If an error occurs.
133133
*/
134134
public List<QOTWQuestion> getUsedQuestionsWithQuery(long guildId, String query, int page, int size) throws SQLException {
135-
String sql = "SELECT * FROM qotw_question WHERE guild_id = ? AND \"text\" LIKE ? AND used = TRUE ORDER BY question_number DESC, created_at ASC LIMIT ? OFFSET ?";
135+
String sql = "SELECT * FROM qotw_question WHERE guild_id = ? AND \"TEXT\" LIKE ? AND used = TRUE ORDER BY question_number DESC, created_at ASC LIMIT ? OFFSET ?";
136136
try (PreparedStatement stmt = con.prepareStatement(sql)) {
137137
stmt.setLong(1, guildId);
138138
stmt.setString(2, "%" + query.toLowerCase() + "%");

src/main/resources/database/schema.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ CREATE TABLE qotw_question
4141
created_at TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
4242
guild_id BIGINT NOT NULL,
4343
created_by BIGINT NOT NULL,
44-
"text" VARCHAR(1024) NOT NULL,
44+
"TEXT" VARCHAR(1024) NOT NULL,
4545
used BOOLEAN NOT NULL DEFAULT FALSE,
4646
question_number INTEGER NULL DEFAULT NULL,
4747
priority INTEGER NOT NULL DEFAULT 0

0 commit comments

Comments
 (0)