[AB-106] adding ability to specify deletion duration on ban command

removing banDelete command
updating jda version
This commit is contained in:
Sheldan
2023-09-26 00:56:15 +02:00
parent f12581f322
commit f97fe42e65
12 changed files with 102 additions and 168 deletions

View File

@@ -0,0 +1,10 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<include file="delete/delete.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -0,0 +1,34 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<property name="banDeleteCommandId" value="(SELECT id FROM command WHERE name = 'banDelete')"/>
<changeSet author="Sheldan" id="delete-banDelete_command">
<sql >
delete from ${database.defaultSchemaName}.command_in_server_allowed_role
where command_in_server_id
in
(select
command_in_server_id
from ${database.defaultSchemaName}.command_in_server
where command_id = (SELECT id FROM ${database.defaultSchemaName}.command WHERE name = 'banDelete'));
delete from ${database.defaultSchemaName}.command_in_server_alias
where command_in_server_id
in
(select command_in_server_id
from ${database.defaultSchemaName}.command_in_server
where command_id =
(SELECT id FROM ${database.defaultSchemaName}.command WHERE name = 'banDelete'))
</sql>
<delete tableName="command_in_server">
<where>command_id=${banDeleteCommandId}</where>
</delete>
<delete tableName="command">
<where>id=${banDeleteCommandId}</where>
</delete>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,10 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<include file="command.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -15,4 +15,5 @@
<include file="1.3.10/collection.xml" relativeToChangelogFile="true"/>
<include file="1.4.0/collection.xml" relativeToChangelogFile="true"/>
<include file="1.4.3/collection.xml" relativeToChangelogFile="true"/>
<include file="1.5.10/collection.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>