File tree 2 files changed +26
-0
lines changed
src/main/resources/liquibase/version
2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 18
18
<include file =" 0.4/2016-08-18--unique_slug_in_collections.xml" relativeToChangelogFile =" true" />
19
19
<include file =" 0.4/2016-08-22--series_sales.xml" relativeToChangelogFile =" true" />
20
20
<include file =" 0.4/2016-08-27--fix_series_sales_price.xml" relativeToChangelogFile =" true" />
21
+ <include file =" 0.4/2016-09-28--add_creator_data_to_series_sales.xml" relativeToChangelogFile =" true" />
21
22
22
23
</databaseChangeLog >
Original file line number Diff line number Diff line change
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.0.xsd" >
7
+
8
+ <changeSet id =" add-creator-columns-to-series_sales_table" author =" cssru" context =" scheme" >
9
+ <comment >Adds created_at and created_by columns to series_sales table and fills them with default data</comment >
10
+
11
+ <addColumn tableName =" series_sales" >
12
+ <column name =" created_at" type =" DATETIME" defaultValueComputed =" ${NOW}" >
13
+ <constraints nullable =" false" />
14
+ </column >
15
+ <column name =" created_by" type =" INTEGER"
16
+ defaultValueComputed=" SELECT u.id FROM users u WHERE u.role = 'ADMIN'" >
17
+ <constraints nullable =" false"
18
+ references=" users(id)"
19
+ foreignKeyName=" fk_series_sales_created_by" />
20
+ </column >
21
+ </addColumn >
22
+
23
+ </changeSet >
24
+
25
+ </databaseChangeLog >
You can’t perform that action at this time.
0 commit comments