CREATE TABLE imageblocks (
	imageblock_id int NOT NULL,
	imageblock_flags int NOT NULL,
	source_url varchar (255) NULL,
	alt_tag_text varchar (50) NULL,
	link_href varchar (255) NULL,
	image_height varchar (5) NULL,
	image_width varchar (5) NULL,
	

	CONSTRAINT PK_imageblocks PRIMARY KEY
	(
		imageblock_id
	),
	CONSTRAINT FK_imageblocks_to_resources FOREIGN KEY
	(
		imageblock_id
	) REFERENCES resources (
		resource_id
	)
)
GO

INSERT INTO classes (type, super_type, db_name, table_name, java_class)
	VALUES(104, 10, null, 'imageblocks', 'org.bodington.server.resources.ImageBlockResource')
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(104, 1, 'imageblock_id', 'setImageBlockId', 'getImageBlockId', '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(104, 2, 'imageblock_flags', 'setImageBlockFlags', 'getImageBlockFlags', 'int', 'int', 0, 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(104, 3, 'source_url', 'setSourceURL', 'getSourceURL', 'java.lang.String', 'java.lang.String', 0, 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(104, 4, 'alt_tag_text', 'setAltTagText', 'getAltTagText', 'java.lang.String', 'java.lang.String', 0, 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(104, 5, 'link_href', 'setLinkHREF', 'getLinkHREF', 'java.lang.String', 'java.lang.String', 0, 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(104, 6, 'image_height', 'setImageHeight', 'getImageHeight', 'java.lang.String', 'java.lang.String', 0, 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(104, 7, 'image_width', 'setImageWidth', 'getImageWidth', 'java.lang.String', 'java.lang.String', 0, null, null, null )
GO

