All Downloads are FREE. Search and download functionalities are using the official Maven repository.

template.conf.sit_javaee6.db-mysql.vm Maven / Gradle / Ivy

There is a newer version: 0.5.2
Show newest version
CREATE TABLE $table.pname (
#foreach ($column in $table.columns)
	$column.pname $column.type #declareLength($column) $column.delareNotNull,
#end
	deleted_flg SMALLINT NOT NULL DEFAULT 0,
	version INTEGER NOT NULL DEFAULT 0,
	created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
	created_by CHAR(8) NOT NULL DEFAULT 'system',
	updated TIMESTAMP NOT NULL ,
	updated_by CHAR(8) DEFAULT 'system',
#foreach ($fk in $table.fkMap.entrySet())
	FOREIGN KEY ($fk.value.srcCols) REFERENCES $fk.value.dstTable ($fk.value.dstCols) ,
#end
	PRIMARY KEY (#foreach ($column in $table.pks) #if ($velocityCount > 1), #end $column.pname #end)
);
#*****************************************************
 *
 *
 ****************************************************#
#macro (declareLength $column)
#set ($type = $column.type.toUpperCase())
#if ($type == "VARCHAR" || $type == "CHAR" || $type == "DECIMAL" || $type == "BLOB" || $type == "TEXT")($column.length)#end
#end





© 2015 - 2024 Weber Informatics LLC | Privacy Policy