 	,birthdaymonth=10
 	,birthdayyear=1972
 	,isactive=1
-);
-db.user = model("user").create(
+)>
+
+<cfset loc.user = model("user").create(
 	username='perd'
 	,password='perd123'
 	,firstname='Per'

	,birthdaymonth=11
	,birthdayyear=1973
	,isactive=1
);

db.per = model("author").create(firstName="Per", lastName="Djurner");
db.per.createProfile(dateOfBirth="20/02/1975", bio="ColdFusion Developer");
db.per.createPost(title="Title for first test post", body="Text for first test post", views=5);
db.per.createPost(title="Title for second test post", body="Text for second test post", views=5, averageRating="3.6");
db.per.createPost(title="Title for third test post", body="Text for third test post", averageRating="3.2");
db.tony = model("author").create(firstName="Tony", lastName="Petruzzi");
db.tony.createPost(title="Title for fourth test post", body="Text for fourth test post", views=3, averageRating="3.6");
db.tony.createPost(title="Title for fifth test post", body="Text for fifth test post", views=2, averageRating="3.6");
db.chris = model("author").create(firstName="Chris", lastName="Peters");
db.peter = model("author").create(firstName="Peter", lastName="Amiri");
db.james = model("author").create(firstName="James", lastName="Gibson");
db.raul = model("author").create(firstName="Raul", lastName="Riera");
db.andy = model("author").create(firstName="Andy", lastName="Bellenie");
db.users = model("user").findAll(order="id");

for (db.user in db.users) {
	for (db.i in [1,2,3,4,5]) {
		db.gallery = model("gallery").create(
			userid="#db.user.id#"
			,title="#db.user.firstname# Test Galllery #db.i#"
			,description="test gallery #db.i# for #db.user.firstname#"
		);
		for (db.j in [1,2,3,4,5,6,7,8,9,10]) {
			db.photo = model("photo").create(
				galleryid="#db.gallery.id#"
				,filename="Gallery #db.gallery.id# Photo Test #db.j#"
				,description1="test photo #db.j# for gallery #db.gallery.id#"
			);
		};
	};
};

model("user2").create(username="Chris", password="x", firstName="x", lastName="x");
model("user2").create(username="Tim", password="x", firstName="x", lastName="x");
model("user2").create(username="Tom", password="x", firstName="x", lastName="x");
// create a profile with an author
model("profile").create(dateOfBirth="1/1/1970", bio="Unknown Author");

db.posts = model("post").findAll(order="id");
for (db.post in db.posts) {
	for (db.i in [1,2,3]) {
		db.comment = model("comment").create(
			postid=db.post.id
			,body="This is comment #db.i#"
			,name="some commenter #db.i#"
			,url="http://#db.i#.somecommenter.com"
			,email="#db.i#@#db.i#.com"
		);
	};
};

// cities and shops
for (db.i in [1,2,3,4,5]) {
	model("city").create(id=3, citycode=db.i, name="county #db.i#");
	model("shop").create(shopid="shop#db.i#", citycode=db.i, name="shop #db.i#");
};
model("shop").create(shopid=" shop6", citycode=0, name="x");

// tags
db.releases = model("tag").create(name="releases",description="testdesc");
model("tag").create(name="minor", description="a minor release", parentid=3);
model("tag").create(name="major", description="a major release");
model("tag").create(name="point", description="a point release", parentid=2);

db.fruit = model("tag").create(name="fruit", description="something to eat");
model("tag").create(name="apple", description="ummmmmm good", parentid=db.fruit.id);
model("tag").create(name="pear", description="rhymes with Per", parentid=db.fruit.id);
model("tag").create(name="banana", description="peel it", parentid=db.fruit.id);

// classifications
model("classification").create(postid=1, tagid=7);

// collisiontests
model("collisiontest").create(method="test");
for (db.i in [1,2,3,4,5]) {
	for (db.a in [1,2,3,4,5]) {
		model("CombiKey").create(id1=db.i, id2=db.a, userId=db.a);
	};
};

// sqltype
model("sqltype").create(stringVariableType="tony", textType="blah blah blah blah");

// assign posts for multiple join test
db.andy.update(favouritePostId=1, leastFavouritePostId=2);
</cfscript>

	,birthdaymonth=11
	,birthdayyear=1975
	,isactive=1
)>

<cfset loc.user = model("user").create(
	username='chrisp'
	,password='chrisp123'
	,firstname='Chris'
