CREATE TABLE sakai_users (
	sakai_user_id int NOT NULL ,
	sakai_id varchar(64),
	CONSTRAINT PK_sakai_user PRIMARY KEY
	(
		sakai_user_id
	),
	CONSTRAINT FK_sakai_users_to_users FOREIGN KEY
	(
		sakai_user_id
	) REFERENCES users (
		user_id
	)
)
GO


INSERT INTO classes (type, super_type, db_name, table_name, java_class)
	VALUES(113,	1, 'building2', 'sakai_users', 'org.bodington.server.realm.SakaiUser')
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(113, 1, 'sakai_user_id', 'setSakaiUserId', 'getSakaiUserId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 1, null, null, null )
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(113, 2, 'sakai_id', 'setSakaiId', 'getSakaiId', 'java.lang.String', 'java.lang.String', 0, null, null, null )
GO
