Skip to content

Commit d2097cf

Browse files
committed
SB-1475: add comment with explanation on what db migration does
1 parent df8c1dd commit d2097cf

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

strongbox-db-liquibase/src/main/resources/db/changelog/v1.0.0/v1.0.0.21__ArtifactEntry.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@
44
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
55
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.2.xsd">
66

7+
<!--
8+
Problem:
9+
Need to change class ArtifactEntry property 'created' type from 'date' into 'datetime'.
10+
"ALTER PROPERTY ArtifactEntry.created TYPE datetime" fails to update property type.
11+
12+
Solution:
13+
Apply sequence of two statements.
14+
1. "DROP PROPERTY ArtifactEntry.created"
15+
"Removes a property from the schema. Does not remove the property values in the records,
16+
it just changes the schema information. Records continue to have the property values, if any."
17+
For details see: https://orientdb.org/docs/3.1.x/sql/SQL-Drop-Property.html
18+
19+
2. "CREATE PROPERTY ArtifactEntry.created datetime"
20+
"Creates a new property in the schema"
21+
For details see: https://orientdb.org/docs/3.1.x/sql/SQL-Create-Property.html
22+
23+
Property values will retain previously existing data, but will have a new type 'datetime'
24+
-->
725
<changeSet id="v1.0.0.21" author="strongbox-dev@carlspring.com">
826

927
<o:dropProperty className="ArtifactEntry" propertyName="created"/>

0 commit comments

Comments
 (0)