CREATE TABLE log_book_events (
	log_book_event_id int NOT NULL ,
	log_book_entry_id int ,
	CONSTRAINT PK_log_book_events PRIMARY KEY
	(
		log_book_event_id
	),
	CONSTRAINT FK_log_book_events_to_events FOREIGN KEY
	(
		log_book_event_id
	) REFERENCES events (
		event_id
	)
)
GO


INSERT INTO classes (type, super_type, db_name, table_name, java_class)
	VALUES(54,	14, NULL, 'log_book_events', 'org.bodington.logbook.server.LogBookEvent')
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(54, 1, 'log_book_event_id', 'setLogBookEventId', 'getLogBookEventId', '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(54, 2, 'log_book_entry_id', 'setLogBookEntryId', 'getLogBookEntryId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 0, null, null, null )
GO

