Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Primary Key to error log table #2306

Merged
merged 2 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- [cygnus-common] Upgrade mysql-java-connector dependency from 8.0.28 to 8.0.33
- [cygnus-common] [SQL] Add Primary Key on Timestamp to Error Log table (#2302)
- [cygnus-common] Upgrade gson dependency from 2.6.2 to 2.10.1
- [cygnus-common] Upgrade mysql-java-connector dependency from 8.0.28 to 8.0.33
- [cygnus-ngsi][cygnus-common] upgrade mockito dep from 1.9.5 to 5.5.0
- [cygnus-ngsi] Fix runtime error: check access aggregator size (#2293)
- [cygnus-ngsi] Switch log level to CYGNUS_LOG_LEVEL env var if was provided to docker (#2286)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,13 +583,15 @@ public void createErrorTable(String dataBase, String schema)
errorTableName = schema + "." + dataBase + DEFAULT_ERROR_TABLE_SUFFIX;
}
String typedFieldNames = "(" +
"timestamp TIMESTAMP" +
"timestamp TIMESTAMP NOT NULL" +
", error text" +
", query text)";
", query text" +
", CONSTRAINT PK_ErrorLog PRIMARY KEY (timestamp) )";
String typedFieldNamesOracle = "(" +
"timestamp TIMESTAMP" +
"timestamp TIMESTAMP NOT NULL" +
", error clob" +
", query clob)";
", query clob" +
", CONSTRAINT PK_ErrorLog PRIMARY KEY (timestamp) )";

Statement stmt = null;
// get a connection to the given destination
Expand Down
Loading