 			PRIMARY KEY(userID)
 		);"
 		
-		getByUsernameQuery = db.prepare "SELECT joinMessages.value, users.* FROM users LEFT JOIN joinMessages ON users.userID = joinMessages.userID WHERE users.lastUsername = ?"
 		getQuery = db.prepare "SELECT value FROM joinMessages WHERE userID = ?"
 		setQuery = db.prepare "INSERT OR REPLACE INTO joinMessages (userID, value) VALUES (?, ?)"
 		delQuery = db.prepare "DELETE FROM joinMessages WHERE userID = ?"

		
unload = (callback) ->
	async.parallel [
		(callback) -> getByUsernameQuery.finalize -> getQuery = null; callback?()
		(callback) -> getQuery.finalize -> getQuery = null; callback?()
		(callback) -> setQuery.finalize -> setQuery = null; callback?()
		(callback) -> delQuery.finalize -> delQuery = null; callback?()

db = require '../db'
{ __, __n } = require '../i18n'

getQuery = setQuery = delQuery = null

onLoad = (callback) ->
	db.serialize ->
