Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">

	<changeSet author="amathe" id="TBL">
        <createTable tableName="AD_RPT_PARAM">
		<column name="ACTIVE" type="number(1)">
			<constraints nullable="false" /></column>
		<column name="CLIENTID" type="number(3)">
			<constraints nullable="false" /></column>
		<column name="CODE" type="varchar2(32)">
			<constraints nullable="false" /></column>
		<column name="CREATEDAT" type="date">
			<constraints nullable="false" /></column>
		<column name="CREATEDBY" type="varchar2(32)">
			<constraints nullable="false" /></column>
		<column name="DATATYPE" type="varchar2(32)">
			<constraints nullable="false" /></column>
		<column name="DEFAULTVALUE" type="varchar2(400)" />
		<column name="DESCRIPTION" type="varchar2(400)" />
		<column name="ID" type="number(19)">
			<constraints nullable="false" /></column>
		<column name="LISTOFVALUES" type="varchar2(400)" />
		<column name="MANDATORY" type="number(1)">
			<constraints nullable="false" /></column>
		<column name="MODIFIEDAT" type="date">
			<constraints nullable="false" /></column>
		<column name="MODIFIEDBY" type="varchar2(32)">
			<constraints nullable="false" /></column>
		<column name="NAME" type="varchar2(255)">
			<constraints nullable="false" /></column>
		<column name="NOEDIT" type="number(1)">
			<constraints nullable="false" /></column>
		<column name="NOTES" type="varchar2(4000)" />
		<column name="SEQUENCENO" type="number(4)">
			<constraints nullable="false" /></column>
		<column name="UUID" type="varchar2(36)" />
		<column name="VERSION" type="number(19)">
			<constraints nullable="false" /></column>
		<column name="REPORT_ID" type="number(19)">
			<constraints nullable="false" /></column>
        </createTable>
    </changeSet>

    <changeSet author="amathe" id="PK">
    	<addPrimaryKey tableName="AD_RPT_PARAM" constraintName="PK_AD_RPT_PARAM" columnNames="ID" />
    </changeSet>

	<changeSet author="amathe" id="UK-1">
		<addUniqueConstraint tableName="AD_RPT_PARAM" constraintName="UK_AD_RPT_PARAM1" columnNames="CLIENTID, REPORT_ID,CODE" />
	</changeSet>

	<changeSet author="amathe" id="UK-2">
		<addUniqueConstraint tableName="AD_RPT_PARAM" constraintName="UK_AD_RPT_PARAM2" columnNames="CLIENTID, REPORT_ID,NAME" />
	</changeSet>

	<changeSet author="amathe" id="SEQ">
		<insert tableName="SEQUENCE">
		    <column name="SEQ_NAME" value="AD_RPT_PARAM_SEQ"/>
		    <column name="SEQ_COUNT" valueNumeric="0"/>
		</insert>
	</changeSet>
</databaseChangeLog>
New to GrepCode? Check out our FAQ X