mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-27 14:23:56 +00:00
[AB-132] fixing experience job not creating user experience records in the database
fixing setup command not being considered templated changing column name for counters fixing liquibase configuration for creating postgres functions fixing duration format expcetion model not available in the template enabling builds for hotfix/bugfix branches
This commit is contained in:
@@ -58,11 +58,12 @@ public class Setup extends AbstractConditionableCommand {
|
||||
public CommandConfiguration getConfiguration() {
|
||||
Parameter newPrefixParameter = Parameter.builder().name("feature").type(String.class).build();
|
||||
List<Parameter> parameters = Arrays.asList(newPrefixParameter);
|
||||
HelpInfo helpInfo = HelpInfo.builder().build();
|
||||
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
|
||||
return CommandConfiguration.builder()
|
||||
.name("setup")
|
||||
.module(ConfigModuleInterface.CONFIG)
|
||||
.parameters(parameters)
|
||||
.templated(true)
|
||||
.async(true)
|
||||
.supportsEmbedException(true)
|
||||
.help(helpInfo)
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog ../../dbchangelog-3.8.xsd
|
||||
http://www.liquibase.org/xml/ns/dbchangelog-ext ../../dbchangelog-3.8.xsd
|
||||
http://www.liquibase.org/xml/ns/pro ../../dbchangelog-3.8.xsd" >
|
||||
<changeSet author="me" id="counter_function" dbms="postgres">
|
||||
<changeSet author="Sheldan" id="counter_function" dbms="postgresql">
|
||||
<sqlFile encoding="utf8" path="sql/counter_function.sql"
|
||||
relativeToChangelogFile="true"
|
||||
stripComments="false"/>
|
||||
splitStatements="false"/>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -6,23 +6,23 @@ BEGIN
|
||||
SELECT count(1)
|
||||
FROM COUNTER
|
||||
INTO v_exists
|
||||
WHERE server_reference = p_server_id
|
||||
WHERE server_id = p_server_id
|
||||
AND counter_key = p_counter_key;
|
||||
|
||||
IF v_exists >= 1 THEN
|
||||
SELECT MAX(counter) + 1
|
||||
INTO v_next_count
|
||||
FROM counter
|
||||
WHERE server_reference = p_server_id
|
||||
WHERE server_id = p_server_id
|
||||
AND counter_key = p_counter_key;
|
||||
|
||||
UPDATE counter
|
||||
SET counter = v_next_count
|
||||
WHERE server_reference = p_server_id
|
||||
WHERE server_id = p_server_id
|
||||
AND counter_key = p_counter_key;
|
||||
ELSE
|
||||
v_next_count := 1;
|
||||
INSERT INTO counter (counter_key, server_reference, counter)
|
||||
INSERT INTO counter (counter_key, server_id, counter)
|
||||
VALUES (p_counter_key, p_server_id, v_next_count);
|
||||
END IF;
|
||||
RETURN v_next_count;
|
||||
|
||||
Reference in New Issue
Block a user