10-Nov-06 (Created: 10-Nov-06) | More in 'Java-Portlets'

Script to create liferay data models 1

create table Account_ (
	accountId varchar(75) not null primary key,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	parentAccountId varchar(75) null,
	name varchar(75) null,
	legalName varchar(75) null,
	legalId varchar(75) null,
	legalType varchar(75) null,
	sicCode varchar(75) null,
	tickerSymbol varchar(75) null,
	industry varchar(75) null,
	type_ varchar(75) null,
	size_ varchar(75) null
);

create table Address (
	addressId varchar(75) not null primary key,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	className varchar(75) null,
	classPK varchar(75) null,
	street1 varchar(75) null,
	street2 varchar(75) null,
	street3 varchar(75) null,
	city varchar(75) null,
	zip varchar(75) null,
	regionId varchar(75) null,
	countryId varchar(75) null,
	typeId varchar(75) null,
	mailing tinyint,
	primary_ tinyint
);

create table BlogsCategory (
	categoryId varchar(75) not null primary key,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	parentCategoryId varchar(75) null,
	name varchar(75) null,
	description longtext null
);

create table BlogsEntry (
	entryId varchar(75) not null primary key,
	groupId varchar(75) not null,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	categoryId varchar(75) null,
	title varchar(75) null,
	content longtext null,
	displayDate datetime null
);

create table BookmarksEntry (
	entryId varchar(75) not null primary key,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	createDate datetime null,
	modifiedDate datetime null,
	folderId varchar(75) null,
	name varchar(75) null,
	url longtext null,
	comments longtext null,
	visits integer
);

create table BookmarksFolder (
	folderId varchar(75) not null primary key,
	groupId varchar(75) not null,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	createDate datetime null,
	modifiedDate datetime null,
	parentFolderId varchar(75) null,
	name varchar(75) null,
	description longtext null
);

create table CalEvent (
	eventId varchar(75) not null primary key,
	groupId varchar(75) not null,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	title varchar(75) null,
	description longtext null,
	startDate datetime null,
	endDate datetime null,
	durationHour integer,
	durationMinute integer,
	allDay tinyint,
	timeZoneSensitive tinyint,
	type_ varchar(75) null,
	repeating tinyint,
	recurrence longtext null,
	remindBy varchar(75) null,
	firstReminder integer,
	secondReminder integer
);

create table Company (
	companyId varchar(75) not null primary key,
	key_ longtext null,
	portalURL varchar(75) null,
	homeURL varchar(75) null,
	mx varchar(75) null
);

create table Contact_ (
	contactId varchar(75) not null primary key,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	accountId varchar(75) null,
	parentContactId varchar(75) null,
	firstName varchar(75) null,
	middleName varchar(75) null,
	lastName varchar(75) null,
	nickName varchar(75) null,
	prefixId varchar(75) null,
	suffixId varchar(75) null,
	male tinyint,
	birthday datetime null,
	smsSn varchar(75) null,
	aimSn varchar(75) null,
	icqSn varchar(75) null,
	jabberSn varchar(75) null,
	msnSn varchar(75) null,
	skypeSn varchar(75) null,
	ymSn varchar(75) null,
	employeeStatusId varchar(75) null,
	employeeNumber varchar(75) null,
	jobTitle varchar(75) null,
	jobClass varchar(75) null,
	hoursOfOperation varchar(75) null
);

create table Counter (
	name varchar(75) not null primary key,
	currentId integer
);

create table Country (
	countryId varchar(75) not null primary key,
	countryCode varchar(75) null,
	name varchar(75) null,
	active_ tinyint
);

create table CyrusUser (
	userId varchar(75) not null primary key,
	password_ varchar(75) not null
);

create table CyrusVirtual (
	emailAddress varchar(75) not null primary key,
	userId varchar(75) not null
);

create table DataTracker (
	dataTrackerId varchar(75) not null primary key,
	companyId varchar(75) not null,
	createdOn datetime null,
	createdByUserId varchar(75) null,
	createdByUserName varchar(75) null,
	updatedOn datetime null,
	updatedBy varchar(75) null,
	className varchar(75) null,
	classPK varchar(75) null,
	active_ tinyint
);

create table DLFileEntry (
	folderId varchar(75) not null,
	name varchar(100) not null,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	versionUserId varchar(75) null,
	versionUserName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	title varchar(100) null,
	description longtext null,
	version double,
	size_ integer,
	readCount integer,
	primary key (folderId, name)
);

create table DLFileRank (
	companyId varchar(75) not null,
	userId varchar(75) not null,
	folderId varchar(75) not null,
	name varchar(100) not null,
	createDate datetime null,
	primary key (companyId, userId, folderId, name)
);

create table DLFileVersion (
	folderId varchar(75) not null,
	name varchar(100) not null,
	version double not null,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	size_ integer,
	primary key (folderId, name, version)
);

create table DLFolder (
	folderId varchar(75) not null primary key,
	groupId varchar(75) not null,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	parentFolderId varchar(75) null,
	name varchar(100) null,
	description longtext null,
	lastPostDate datetime null
);

create table EmailAddress (
	emailAddressId varchar(75) not null primary key,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	className varchar(75) null,
	classPK varchar(75) null,
	address varchar(75) null,
	typeId varchar(75) null,
	primary_ tinyint
);

create table Group_ (
	groupId varchar(75) not null primary key,
	companyId varchar(75) not null,
	className varchar(75) null,
	classPK varchar(75) null,
	parentGroupId varchar(75) null,
	name varchar(75) null,
	description longtext null,
	type_ varchar(75) null,
	friendlyURL varchar(75) null
);

create table Groups_Orgs (
	groupId varchar(75) not null,
	organizationId varchar(75) not null,
	primary key (groupId, organizationId)
);

create table Groups_Permissions (
	groupId  varchar(75) not null,
	permissionId varchar(75) not null,
	primary key (groupId, permissionId)
);

create table Groups_Roles (
	groupId varchar(75) not null,
	roleId varchar(75) not null,
	primary key (groupId, roleId)
);

create table Groups_UserGroups (
	groupId varchar(75) not null,
	userGroupId varchar(75) not null,
	primary key (groupId, userGroupId)
);

create table IGFolder (
	folderId varchar(75) not null primary key,
	groupId varchar(75) not null,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	createDate datetime null,
	modifiedDate datetime null,
	parentFolderId varchar(75) null,
	name varchar(75) null,
	description longtext null
);

create table IGImage (
	companyId varchar(75) not null,
	imageId varchar(75) not null,
	userId varchar(75) not null,
	createDate datetime null,
	modifiedDate datetime null,
	folderId varchar(75) null,
	description longtext null,
	height integer,
	width integer,
	size_ integer,
	primary key (companyId, imageId)
);

create table Image (
	imageId varchar(200) not null primary key,
	modifiedDate datetime null,
	text_ longtext null
);

create table JournalArticle (
	companyId varchar(75) not null,
	articleId varchar(75) not null,
	version double not null,
	groupId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	title varchar(75) null,
	content longtext null,
	type_ varchar(75) null,
	structureId varchar(75) null,
	templateId varchar(75) null,
	displayDate datetime null,
	approved tinyint,
	approvedByUserId varchar(75) null,
	approvedByUserName varchar(75) null,
	approvedDate datetime null,
	expired tinyint,
	expirationDate datetime null,
	reviewDate datetime null,
	primary key (companyId, articleId, version)
);

create table JournalContentSearch (
	portletId varchar(75) not null,
	layoutId varchar(75) not null,
	ownerId varchar(75) not null,
	companyId varchar(75) not null,
	articleId varchar(75) null,
	primary key (portletId, layoutId, ownerId)
);

create table JournalStructure (
	companyId varchar(75) not null,
	structureId varchar(75) not null,
	groupId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	name varchar(75) null,
	description longtext null,
	xsd longtext null,
	primary key (companyId, structureId)
);

create table JournalTemplate (
	companyId varchar(75) not null,
	templateId varchar(75) not null,
	groupId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	structureId varchar(75) null,
	name varchar(75) null,
	description longtext null,
	xsl longtext null,
	langType varchar(75) null,
	smallImage tinyint,
	smallImageURL varchar(75) null,
	primary key (companyId, templateId)
);

create table Layout (
	layoutId varchar(75) not null,
	ownerId varchar(75) not null,
	companyId varchar(75) not null,
	parentLayoutId varchar(75) null,
	name longtext null,
	type_ varchar(75) null,
	typeSettings longtext null,
	hidden_ tinyint,
	friendlyURL varchar(75) null,
	themeId varchar(75) null,
	colorSchemeId varchar(75) null,
	priority integer,
	primary key (layoutId, ownerId)
);

create table LayoutSet (
	ownerId varchar(75) not null primary key,
	companyId varchar(75) not null,
	groupId varchar(75) not null,
	userId varchar(75) not null,
	privateLayout tinyint,
	themeId varchar(75) null,
	colorSchemeId varchar(75) null,
	pageCount integer
);

create table ListType (
	listTypeId varchar(75) not null primary key,
	name varchar(75) null,
	type_ varchar(75) null
);

create table MBStatsUser (
	groupId varchar(75) not null,
	userId varchar(75) not null,
	messageCount integer,
	lastPostDate datetime null,
	primary key (groupId, userId)
);

create table MBCategory (
	categoryId varchar(75) not null primary key,
	groupId varchar(75) not null,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	parentCategoryId varchar(75) null,
	name varchar(75) null,
	description longtext null,
	lastPostDate datetime null
);

create table MBDiscussion (
	discussionId varchar(75) not null primary key,
	className varchar(75) null,
	classPK varchar(75) null,
	threadId varchar(75) null
);

create table MBMessage (
	topicId varchar(75) not null,
	messageId varchar(75) not null,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	categoryId varchar(75) null,
	threadId varchar(75) null,
	parentMessageId varchar(75) null,
	subject varchar(75) null,
	body longtext null,
	attachments tinyint,
	anonymous tinyint,
	primary key (topicId, messageId)
);

create table MBMessageFlag (
	topicId varchar(75) not null,
	messageId varchar(75) not null,
	userId varchar(75) not null,
	flag varchar(75) null,
	primary key (topicId, messageId, userId)
);

create table MBThread (
	threadId varchar(75) not null primary key,
	categoryId varchar(75) null,
	topicId varchar(75) null,
	rootMessageId varchar(75) null,
	messageCount integer,
	viewCount integer,
	lastPostByUserId varchar(75) null,
	lastPostDate datetime null
);

create table MBTopic (
	topicId varchar(75) not null primary key,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	categoryId varchar(75) null,
	name varchar(75) null,
	description longtext null,
	lastPostDate datetime null
);

create table Organization_ (
	organizationId varchar(75) not null primary key,
	companyId varchar(75) not null,
	parentOrganizationId varchar(75) null,
	name varchar(75) null,
	recursable tinyint,
	regionId varchar(75) null,
	countryId varchar(75) null,
	statusId varchar(75) null,
	comments longtext null
);

create table OrgGroupPermission (
	organizationId varchar(75) not null,
	groupId varchar(75) not null,
	permissionId varchar(75) not null,
	primary key (organizationId, groupId, permissionId)
);

create table OrgGroupRole (
	organizationId varchar(75) not null,
	groupId varchar(75) not null,
	roleId varchar(75) not null,
	primary key (organizationId, groupId, roleId)
);

create table OrgLabor (
	orgLaborId varchar(75) not null primary key,
	organizationId varchar(75) null,
	typeId varchar(75) null,
	sunOpen integer,
	sunClose integer,
	monOpen integer,
	monClose integer,
	tueOpen integer,
	tueClose integer,
	wedOpen integer,
	wedClose integer,
	thuOpen integer,
	thuClose integer,
	friOpen integer,
	friClose integer,
	satOpen integer,
	satClose integer
);

create table PasswordTracker (
	passwordTrackerId varchar(75) not null primary key,
	userId varchar(75) not null,
	createDate datetime null,
	password_ varchar(75) null
);

create table Permission_ (
	permissionId varchar(75) not null primary key,
	companyId varchar(75) not null,
	actionId varchar(75) null,
	resourceId varchar(75) null
);

create table Phone (
	phoneId varchar(75) not null primary key,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	className varchar(75) null,
	classPK varchar(75) null,
	number_ varchar(75) null,
	extension varchar(75) null,
	typeId varchar(75) null,
	primary_ tinyint
);

create table PollsChoice (
	questionId varchar(75) not null,
	choiceId varchar(75) not null,
	description varchar(75) null,
	primary key (questionId, choiceId)
);

create table PollsQuestion (
	questionId varchar(75) not null primary key,
	groupId varchar(75) not null,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	title varchar(75) null,
	description longtext null,
	expirationDate datetime null,
	lastVoteDate datetime null
);

create table PollsVote (
	questionId varchar(75) not null,
	userId varchar(75) not null,
	choiceId varchar(75) null,
	voteDate datetime null,
	primary key (questionId, userId)
);

create table Portlet (
	portletId varchar(75) not null,
	companyId varchar(75) not null,
	narrow tinyint,
	roles varchar(75) null,
	active_ tinyint,
	primary key (portletId, companyId)
);

create table PortletPreferences (
	portletId varchar(75) not null,
	layoutId varchar(75) not null,
	ownerId varchar(75) not null,
	preferences longtext null,
	primary key (portletId, layoutId, ownerId)
);

create table Region (
	regionId varchar(75) not null primary key,
	countryId varchar(75) null,
	regionCode varchar(75) null,
	name varchar(75) null,
	active_ tinyint
);

create table Release_ (
	releaseId varchar(75) not null primary key,
	createDate datetime null,
	modifiedDate datetime null,
	buildNumber integer,
	buildDate datetime null
);

create table Resource_ (
	resourceId varchar(25) not null primary key,
	companyId varchar(25) not null,
	name varchar(75) null,
	typeId varchar(15) null,
	scope varchar(15) null,
	primKey varchar(200) null
);

create table Role_ (
	roleId varchar(75) not null primary key,
	companyId varchar(75) not null,
	className varchar(75) null,
	classPK varchar(75) null,
	name varchar(75) null,
	description longtext null
);

create table Roles_Permissions (
	roleId varchar(75) not null,
	permissionId varchar(75) not null,
	primary key (roleId, permissionId)
);

create table ShoppingCart (
	cartId varchar(75) not null primary key,
	groupId varchar(75) not null,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	itemIds longtext null,
	couponIds longtext null,
	altShipping integer,
	insure tinyint
);

create table ShoppingCategory (
	categoryId varchar(75) not null primary key,
	groupId varchar(75) not null,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	parentCategoryId varchar(75) null,
	name varchar(75) null,
	description longtext null
);

create table ShoppingCoupon (
	couponId varchar(75) not null primary key,
	groupId varchar(75) not null,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	name varchar(75) null,
	description longtext null,
	startDate datetime null,
	endDate datetime null,
	active_ tinyint,
	limitCategories longtext null,
	limitSkus longtext null,
	minOrder double,
	discount double,
	discountType varchar(75) null
);

create table ShoppingItem (
	itemId varchar(75) not null primary key,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	categoryId varchar(75) null,
	sku varchar(75) null,
	name varchar(200) null,
	description longtext null,
	properties longtext null,
	fields_ tinyint,
	fieldsQuantities longtext null,
	minQuantity integer,
	maxQuantity integer,
	price double,
	discount double,
	taxable tinyint,
	shipping double,
	useShippingFormula tinyint,
	requiresShipping tinyint,
	stockQuantity integer,
	featured_ tinyint,
	sale_ tinyint,
	smallImage tinyint,
	smallImageURL varchar(75) null,
	mediumImage tinyint,
	mediumImageURL varchar(75) null,
	largeImage tinyint,
	largeImageURL varchar(75) null
);

create table ShoppingItemField (
	itemFieldId varchar(75) not null primary key,
	itemId varchar(75) null,
	name varchar(75) null,
	values_ longtext null,
	description longtext null
);

create table ShoppingItemPrice (
	itemPriceId varchar(75) not null primary key,
	itemId varchar(75) null,
	minQuantity integer,
	maxQuantity integer,
	price double,
	discount double,
	taxable tinyint,
	shipping double,
	useShippingFormula tinyint,
	status integer
);

create table ShoppingOrder (
	orderId varchar(75) not null primary key,
	groupId varchar(75) not null,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	tax double,
	shipping double,
	altShipping varchar(75) null,
	requiresShipping tinyint,
	insure tinyint,
	insurance double,
	couponIds varchar(75) null,
	couponDiscount double,
	billingFirstName varchar(75) null,
	billingLastName varchar(75) null,
	billingEmailAddress varchar(75) null,
	billingCompany varchar(75) null,
	billingStreet varchar(75) null,
	billingCity varchar(75) null,
	billingState varchar(75) null,
	billingZip varchar(75) null,
	billingCountry varchar(75) null,
	billingPhone varchar(75) null,
	shipToBilling tinyint,
	shippingFirstName varchar(75) null,
	shippingLastName varchar(75) null,
	shippingEmailAddress varchar(75) null,
	shippingCompany varchar(75) null,
	shippingStreet varchar(75) null,
	shippingCity varchar(75) null,
	shippingState varchar(75) null,
	shippingZip varchar(75) null,
	shippingCountry varchar(75) null,
	shippingPhone varchar(75) null,
	ccName varchar(75) null,
	ccType varchar(75) null,
	ccNumber varchar(75) null,
	ccExpMonth integer,
	ccExpYear integer,
	ccVerNumber varchar(75) null,
	comments longtext null,
	ppTxnId varchar(75) null,
	ppPaymentStatus varchar(75) null,
	ppPaymentGross double,
	ppReceiverEmail varchar(75) null,
	ppPayerEmail varchar(75) null,
	sendOrderEmail tinyint,
	sendShippingEmail tinyint
);

create table ShoppingOrderItem (
	orderId varchar(75) not null,
	itemId varchar(75) not null,
	sku varchar(75) null,
	name varchar(200) null,
	description longtext null,
	properties longtext null,
	price double,
	quantity integer,
	shippedDate datetime null,
	primary key (orderId, itemId)
);

create table Subscription (
	subscriptionId varchar(75) not null primary key,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	className varchar(75) null,
	classPK varchar(75) null,
	frequency varchar(75) null
);

create table UserGroup (
	userGroupId varchar(75) not null primary key,
	companyId varchar(75) not null,
	parentUserGroupId varchar(75) null,
	name varchar(75) null,
	description longtext null
);

create table User_ (
	userId varchar(75) not null primary key,
	companyId varchar(75) not null,
	createDate datetime null,
	modifiedDate datetime null,
	contactId varchar(75) null,
	password_ varchar(75) null,
	passwordEncrypted tinyint,
	passwordExpirationDate datetime null,
	passwordReset tinyint,
	emailAddress varchar(75) null,
	languageId varchar(75) null,
	timeZoneId varchar(75) null,
	greeting varchar(75) null,
	resolution varchar(75) null,
	comments longtext null,
	loginDate datetime null,
	loginIP varchar(75) null,
	lastLoginDate datetime null,
	lastLoginIP varchar(75) null,
	failedLoginAttempts integer,
	agreedToTermsOfUse tinyint,
	active_ tinyint
);

create table UserIdMapper (
	userId varchar(75) not null,
	type_ varchar(75) not null,
	description varchar(75) null,
	externalUserId varchar(75) null,
	primary key (userId, type_)
);

create table Users_Groups (
	userId varchar(75) not null,
	groupId varchar(75) not null,
	primary key (userId, groupId)
);

create table Users_Orgs (
	userId varchar(75) not null,
	organizationId varchar(75) not null,
	primary key (userId, organizationId)
);

create table Users_Permissions (
	userId varchar(75) not null,
	permissionId varchar(75) not null,
	primary key (userId, permissionId)
);

create table Users_Roles (
	userId varchar(75) not null,
	roleId varchar(75) not null,
	primary key (userId, roleId)
);

create table Users_UserGroups (
	userId varchar(75) not null,
	userGroupId varchar(75) not null,
	primary key (userId, userGroupId)
);

create table UserTracker (
	userTrackerId varchar(75) not null primary key,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	modifiedDate datetime null,
	remoteAddr varchar(75) null,
	remoteHost varchar(75) null,
	userAgent varchar(75) null
);

create table UserTrackerPath (
	userTrackerPathId varchar(75) not null primary key,
	userTrackerId varchar(75) null,
	path longtext null,
	pathDate datetime null
);

create table Website (
	websiteId varchar(75) not null primary key,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	className varchar(75) null,
	classPK varchar(75) null,
	url varchar(75) null,
	typeId varchar(75) null,
	primary_ tinyint
);

create table WikiNode (
	nodeId varchar(75) not null primary key,
	groupId varchar(75) not null,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	modifiedDate datetime null,
	name varchar(75) null,
	description longtext null,
	lastPostDate datetime null
);

create table WikiPage (
	nodeId varchar(75) not null,
	title varchar(75) not null,
	version double not null,
	companyId varchar(75) not null,
	userId varchar(75) not null,
	userName varchar(75) null,
	createDate datetime null,
	content longtext null,
	format varchar(75) null,
	head tinyint,
	primary key (nodeId, title, version)
);