RE: All ngrinder_version operation in chabgelog.xml //Re: Update rules about DB change

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

RE: All ngrinder_version operation in chabgelog.xml //Re: Update rules about DB change

junoyoon
Administrator

Do not rely on the ngrinder version.


There is already liquibase db version scheme... Just use that version only.


If you follow both schemes, it'll make the ngrinder db upgrade complex.


JunHo Yoon
Global Platform Development Lab
/ Senior Engineer

13th FL., Bundang First Tower, 266-1, Seohyeon-dong, Bundang-gu, Seongnam-si, Gyeonggi-do, 463-824, KOREA
Tel 031-600-9071   Fax --   Mobile 010-6255-0559
Email  [hidden email]

NHN Business & Platform NAVER HANGAME 쥬니어네이버 해피빈 미투데이


-----Original Message-----
From: "Matt [via ngrinder]"<[hidden email]>
To: "junoyoon"<[hidden email]>;
Cc:
Sent: 2012-10-15 (월) 11:38:57
Subject: All ngrinder_version operation in chabgelog.xml //Re: Update rules about DB change


Add  create table sql at logfile.xml,
if there is no version table in DB,it will be created.

<changeSet author="ngrinder_ver" id="1" >
                <preConditions onFail="MARK_RAN">
                  <not>
                          <tableExists tableName="ngrinder_version"/>
                    </not>
                </preConditions>
                <createTable tableName="ngrinder_version">
                        <column name="id" type="bigint">
                        <constraints primaryKey="true" nullable="false"/>
                        </column>
                        <column name="version" type="double" />
                </createTable>
                <insert tableName="ngrinder_version">
                        <column name="id" valueNumeric="1"/>
    <column name="version" valueNumeric="3.0"/>
                </insert>
</changeSet>

this vesion number will be increased along with nGrinder DB changes

e.g
based on this condition,liquibase will decide this whether be exec
<preConditions onFail="MARK_RAN">
            <sqlCheck expectedResult="1">SELECT COUNT(1) from ngrinder_version WHERE ver<=3.1</sqlCheck>
</preConditions>

and then DB version also will be updated

<update tableName="ngrinder_version">
    <column name="version" value="3.1"/>
    <where>id=1</where>
</update>

All ngrinder_version table C R U D will be in changelog.xml  and
it will not be operated on codes leve.


If you reply to this email, your message will be added to the discussion below:
http://ngrinder.642.n7.nabble.com/Update-rules-about-DB-change-tp20p26.html
To start a new topic under ngrinder_dev, email [hidden email]
To unsubscribe from ngrinder_dev, click here.
NAML