 <cfquery name="loc.query" datasource="wheelstestdb">
 CREATE TABLE authors
 (
-	<cfif loc.db IS "sqlite">
-		id integer NOT NULL PRIMARY KEY #loc.ident#,
-	<cfelse>
-		id int NOT NULL #loc.ident# PRIMARY KEY,
-	</cfif>
+	id #loc.identityColumnType#,
 	firstname varchar(100) NOT NULL,
-	lastname varchar(100) NOT NULL
-) #loc.engine#
+	lastname varchar(100) NOT NULL,
+	PRIMARY KEY(id)
+) #loc.storageEngine#
 </cfquery>
 
 <cfquery name="loc.query" datasource="wheelstestdb">
 CREATE TABLE cities
 (
 	countyid char(4) NOT NULL,
-	citycode tinyint NOT NULL,
+	citycode int NOT NULL,
 	name varchar(50) NOT NULL,
 	PRIMARY KEY(countyid,citycode)
-) #loc.engine#
+) #loc.storageEngine#
 </cfquery>
 
 <cfquery name="loc.query" datasource="wheelstestdb">
 CREATE TABLE classifications
 (
-	<cfif loc.db IS "sqlite">
-		id integer NOT NULL PRIMARY KEY #loc.ident#,
-	<cfelse>
-		id int NOT NULL #loc.ident# PRIMARY KEY,
-	</cfif>
+	id #loc.identityColumnType#,
 	postid int NOT NULL,
-	tagid int NOT NULL
-) #loc.engine#
+	tagid int NOT NULL,
+	PRIMARY KEY(id)
+) #loc.storageEngine#
 </cfquery>
 
 <cfquery name="loc.query" datasource="wheelstestdb">
 CREATE TABLE collisiontests
 (
-	<cfif loc.db IS "sqlite">
-		id integer NOT NULL PRIMARY KEY #loc.ident#,
-	<cfelse>
-		id int NOT NULL #loc.ident# PRIMARY KEY,
-	</cfif>
-	method varchar(100) NOT NULL
-) #loc.engine#
+	id #loc.identityColumnType#,
+	method varchar(100) NOT NULL,
+	PRIMARY KEY(id)
+) #loc.storageEngine#
 </cfquery>
 
 <cfquery name="loc.query" datasource="wheelstestdb">
 CREATE TABLE comments
 (
-	<cfif loc.db IS "sqlite">
-		id integer NOT NULL PRIMARY KEY #loc.ident#,
-	<cfelse>
-		id int NOT NULL #loc.ident# PRIMARY KEY,
-	</cfif>
+	id #loc.identityColumnType#,
 	postid int NOT NULL,
 	body text NOT NULL,
 	name varchar(100) NOT NULL,
 	url varchar(100) NULL,
 	email varchar(100) NULL,
-	createdat datetime NOT NULL
-) #loc.engine#
+	createdat #loc.datetimeColumnType# NOT NULL,
+	PRIMARY KEY(id)
+) #loc.storageEngine#
 </cfquery>
 
 <cfquery name="loc.query" datasource="wheelstestdb">
 CREATE TABLE photogalleries
 (
-	<cfif loc.db IS "sqlite">
-		photogalleryid integer NOT NULL PRIMARY KEY #loc.ident#,
-	<cfelse>
-		photogalleryid int NOT NULL #loc.ident# PRIMARY KEY,
-	</cfif>
+	photogalleryid #loc.identityColumnType#,
 	userid int NOT NULL,
 	title varchar(255) NOT NULL,
-	description text NOT NULL
-) #loc.engine#
+	description text NOT NULL,
+	PRIMARY KEY(photogalleryid)
+) #loc.storageEngine#
 </cfquery>
 
 <cfquery name="loc.query" datasource="wheelstestdb">
 CREATE TABLE photogalleryphotos
 (
-	<cfif loc.db IS "sqlite">
-		photogalleryphotoid integer NOT NULL PRIMARY KEY #loc.ident#,
-	<cfelse>
-		photogalleryphotoid int NOT NULL #loc.ident# PRIMARY KEY,
-	</cfif>
+	photogalleryphotoid #loc.identityColumnType#,
 	photogalleryid int NOT NULL,
 	filename varchar(255) NOT NULL,
 	description varchar(255) NOT NULL,
-	filedata <cfif loc.db IS "microsoftsqlserver">image<cfelse>blob</cfif> NULL
-) #loc.engine#
+	filedata #loc.binaryColumnType# NULL,
+	PRIMARY KEY(photogalleryphotoid)
+) #loc.storageEngine#
 </cfquery>
 
 <cfquery name="loc.query" datasource="wheelstestdb">
 CREATE TABLE posts
 (
-	<cfif loc.db IS "sqlite">
-		id integer NOT NULL PRIMARY KEY #loc.ident#,
-	<cfelse>
-		id int NOT NULL #loc.ident# PRIMARY KEY,
-	</cfif>
+	id #loc.identityColumnType#,
 	authorid int NULL,
 	title varchar(250) NOT NULL,
 	body text NOT NULL,
-	createdat datetime NOT NULL,
-	updatedat datetime NOT NULL,
-	deletedat datetime NULL,
+	createdat #loc.datetimeColumnType# NOT NULL,
+	updatedat #loc.datetimeColumnType# NOT NULL,
+	deletedat #loc.datetimeColumnType# NULL,
 	views int NOT NULL DEFAULT 0,
-	averagerating float NULL
-) #loc.engine#
+	averagerating float NULL,
+	PRIMARY KEY(id)
+) #loc.storageEngine#
 </cfquery>
 
 <cfquery name="loc.query" datasource="wheelstestdb">
 CREATE TABLE profiles
 (
-	<cfif loc.db IS "sqlite">
-		id integer NOT NULL PRIMARY KEY #loc.ident#,
-	<cfelse>
-		id int NOT NULL #loc.ident# PRIMARY KEY,
-	</cfif>
+	id #loc.identityColumnType#,
 	authorid int NULL,
-	dateofbirth datetime NOT NULL,
-	bio text NULL
-) #loc.engine#
+	dateofbirth #loc.datetimeColumnType# NOT NULL,
+	bio text NULL,
+	PRIMARY KEY(id)
+) #loc.storageEngine#
 </cfquery>
 
 <cfquery name="loc.query" datasource="wheelstestdb">
 CREATE TABLE shops
 (
-	shopid char(9) NOT NULL PRIMARY KEY,
-	citycode tinyint NULL,
-	name varchar(80) NOT NULL
-) #loc.engine#
+	shopid char(9) NOT NULL,
+	citycode int NULL,
+	name varchar(80) NOT NULL,
+	PRIMARY KEY(shopid)
+) #loc.storageEngine#
 </cfquery>
 
 <cfquery name="loc.query" datasource="wheelstestdb">
 CREATE TABLE tags
 (
-	<cfif loc.db IS "sqlite">
-		id integer NOT NULL PRIMARY KEY #loc.ident#,
-	<cfelse>
-		id int NOT NULL #loc.ident# PRIMARY KEY,
-	</cfif>
+	id #loc.identityColumnType#,
 	name varchar(50) NOT NULL,
-	description varchar(50) NULL
-) #loc.engine#
+	description varchar(50) NULL,
+	PRIMARY KEY(id)
+) #loc.storageEngine#
 </cfquery>
 
 <cfquery name="loc.query" datasource="wheelstestdb">
 CREATE TABLE users
 (
-	<cfif loc.db IS "sqlite">
-		id integer NOT NULL PRIMARY KEY #loc.ident#,
-	<cfelse>
-		id int NOT NULL #loc.ident# PRIMARY KEY,
-	</cfif>
+	id #loc.identityColumnType#,
 	username varchar(50) NOT NULL,
 	password varchar(50) NOT NULL,
 	firstname varchar(50) NOT NULL,

	,birthday='11/12/1973'
	,birthdaymonth=11
	,birthdayyear=1973
	,isactive=true
)>

<cfset loc.per = model("author").create(firstName="Per", lastName="Djurner")>

	,birthday='09/12/1973'
	,birthdaymonth=9
	,birthdayyear=1973
	,isactive=1
)>

<cfset loc.user = model("user").create(
