mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-27 23:09:05 +00:00
[AB-190] migrating default config (featureMode, system config, post targets, feature flags) from tables to property files
not longer immediately instantiating the feature flag instance when a new server is found, but only when its config is changed or when a feature mod has its config changed
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package dev.sheldan.abstracto.experience.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
|
||||
@Configuration
|
||||
@PropertySource("classpath:experience-config.properties")
|
||||
public class ExperienceConfig {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
abstracto.systemConfigs.minExp.name=minExp
|
||||
abstracto.systemConfigs.minExp.longValue=10
|
||||
abstracto.systemConfigs.maxExp.name=maxExp
|
||||
abstracto.systemConfigs.maxExp.longValue=25
|
||||
abstracto.systemConfigs.expMultiplier.name=expMultiplier
|
||||
abstracto.systemConfigs.expMultiplier.longValue=1
|
||||
|
||||
abstracto.featureFlags.experience.featureName=experience
|
||||
abstracto.featureFlags.experience.enabled=false
|
||||
@@ -10,7 +10,5 @@
|
||||
<include file="feature.xml" relativeToChangelogFile="true"/>
|
||||
<include file="module.xml" relativeToChangelogFile="true"/>
|
||||
<include file="command.xml" relativeToChangelogFile="true"/>
|
||||
<include file="default_config.xml" relativeToChangelogFile="true"/>
|
||||
<include file="experience_job.xml" relativeToChangelogFile="true"/>
|
||||
<include file="default_feature_flag.xml" relativeToChangelogFile="true"/>
|
||||
</databaseChangeLog>
|
||||
@@ -1,28 +0,0 @@
|
||||
<?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-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" >
|
||||
<property name="today" value="(SELECT NOW())"/>
|
||||
<changeSet author="Sheldan" id="experience_default_config-insert">
|
||||
<insert tableName="default_config">
|
||||
<column name="name" value="minExp"/>
|
||||
<column name="long_value" value="10"/>
|
||||
<column name="created" valueComputed="${today}"/>
|
||||
</insert>
|
||||
<insert tableName="default_config">
|
||||
<column name="name" value="maxExp"/>
|
||||
<column name="long_value" value="25"/>
|
||||
<column name="created" valueComputed="${today}"/>
|
||||
</insert>
|
||||
<insert tableName="default_config">
|
||||
<column name="name" value="expMultiplier"/>
|
||||
<column name="double_value" value="1"/>
|
||||
<column name="created" valueComputed="${today}"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
@@ -1,18 +0,0 @@
|
||||
<?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-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" >
|
||||
<property name="experienceFeature" value="(SELECT id FROM feature WHERE key = 'experience')"/>
|
||||
<property name="today" value="(SELECT NOW())"/>
|
||||
<changeSet author="Sheldan" id="experience_default_feature_flag-insertion">
|
||||
<insert tableName="default_feature_flag">
|
||||
<column name="enabled" value="false"/>
|
||||
<column name="feature_id" valueComputed="${experienceFeature}" />
|
||||
<column name="created" valueComputed="${today}"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
Reference in New Issue
Block a user