source: trunk/fmgVen/etc/test-db/test-db-changelog.xml @ 26

Last change on this file since 26 was 26, checked in by fmguler, 13 years ago

Refs #3 - Ven.save() is transferred to the new package. Save use case is completed. Convert.toDB() converts camel case object names to database names with underscores. Unchecked VenException is thrown by Ven methods. Liquibase changelog (test-db-changelog.xml) is changed to include only a simple object to test save operation. It creates a sample database table and inserts a sample row. On rollback it removes sample data. Using liquibase, Sample.java builds database, tests save operation and rolls back.

QueryGenerator generates insert and update queries for save and generates sequence query to assign ids to new objects. Ven calls query generator and runs the query using spring jdbc template.

Old codebase updated to run at Java 1.4

File size: 1.7 KB
Line 
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<databaseChangeLog logicalFilePath="database-schema.xml" xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
3    <changeSet author="fmguler" id="init">
4    </changeSet>
5    <changeSet author="fmguler" id="0">
6        <tagDatabase tag="tag-init"/>
7    </changeSet>
8    <!-- TEST SCHEMA >> -->
9    <changeSet author="fmguler" id="1">
10        <createTable schemaName="public" tableName="some_domain_object">
11            <column autoIncrement="true" name="id" type="serial">
12                <constraints nullable="false" primaryKey="true" primaryKeyName="some_domain_object_pkey"/>
13            </column>
14            <column name="name" type="VARCHAR(100)"/>
15            <column name="description" type="TEXT(2147483647)"/>
16            <column name="date" type="TIMESTAMP WITHOUT TIME ZONE"/>
17        </createTable>
18    </changeSet>
19    <changeSet author="fmguler" id="2">
20        <tagDatabase tag="tag-single-table"/>
21    </changeSet>
22    <changeSet author="fmguler" id="3">
23        <insert schemaName="public" tableName="some_domain_object">
24            <column name="name" value="name1"/>
25            <column name="description" value="desc1"/>
26            <column name="date" value="2010-10-13"/>
27        </insert>
28        <rollback>
29            delete from some_domain_object;
30        </rollback>
31    </changeSet>
32    <changeSet author="fmguler" id="4">
33        <tagDatabase tag="tag-single-table-data"/>
34    </changeSet>
35    <!-- << TEST SCHEMA -->
36</databaseChangeLog>
Note: See TracBrowser for help on using the repository browser.