create table Block (
	id serial,

	createdate timestamp not null,

	displayorder integer not null default 0,
	attachment integer null references Attachment(id),
	media integer null references Media(id),
	image integer null references Image(id),
	bodytext text null,

	primary key (id)
);

create table Block (
	id serial,

	createdate timestamp not null,

	displayorder integer not null default 0,
	attachment integer null references Attachment(id) on delete set null,
	media integer null references Media(id) on delete set null,
	image integer null references Image(id) on delete set null,
	bodytext text null,

	primary key (id)
);

Add delete constraints for sub-objects for blocks.
Add delete constraints for sub-objects for blocks.
