Skip to content

Commit fd2b4b9

Browse files
committed
refactor: create tables for holding site parsers and their configuration.
Addressed to #975 No functional changes.
1 parent 313fd62 commit fd2b4b9

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

src/main/resources/liquibase/version/0.4.xml

+1
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,6 @@
5555
<include file="0.4/2018-07-05--series_import_parsed_data_michel_numbers_field.xml" relativeToChangelogFile="true" />
5656
<include file="0.4/2018-07-15--series_import_parsed_data_group_id_field.xml" relativeToChangelogFile="true" />
5757
<include file="0.4/2018-10-16--similar_series.xml" relativeToChangelogFile="true"/>
58+
<include file="0.4/2018-12-03--site_parsers.xml" relativeToChangelogFile="true"/>
5859

5960
</databaseChangeLog>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<databaseChangeLog
3+
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
6+
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
7+
8+
<changeSet id="create-site_parsers-table" author="php-coder" context="scheme">
9+
10+
<createTable tableName="site_parsers">
11+
<column name="id" type="INTEGER" autoIncrement="true">
12+
<constraints primaryKey="true" />
13+
</column>
14+
<column name="name" type="VARCHAR(25)">
15+
<constraints unique="true" uniqueConstraintName="uc_site_parsers_name" nullable="false" />
16+
</column>
17+
</createTable>
18+
19+
</changeSet>
20+
21+
<changeSet id="create-site_parser_params-table" author="php-coder" context="scheme">
22+
23+
<createTable tableName="site_parser_params">
24+
<column name="parser_id" type="INTEGER">
25+
<constraints references="site_parsers(id)" foreignKeyName="fk_site_parsers_parser_id" />
26+
</column>
27+
<column name="name" type="VARCHAR(25)">
28+
<constraints nullable="false" />
29+
</column>
30+
<column name="value" type="VARCHAR(50)">
31+
<constraints nullable="false" />
32+
</column>
33+
</createTable>
34+
35+
<addUniqueConstraint
36+
tableName="site_parser_params"
37+
columnNames="parser_id, name"
38+
constraintName="uc_site_parser_params_parser_id_name" />
39+
40+
</changeSet>
41+
42+
</databaseChangeLog>

0 commit comments

Comments
 (0)