User:Mikelietz/Blocks

From Habari Project

Jump to: navigation, search
blocks_areas
(id, block_instance_id, area_name, order, scope_id)
block_instances
(id, instance_name, title, data, type)
block_scopes
(id, scope_name, criteria, order)
CREATE TABLE {$prefix}blocks_areas (
	id INT UNSIGNED NOT NULL AUTO_INCREMENT,
	block_instance_id INT UNSIGNED NOT NULL,
	area_name VARCHAR(255) NOT NULL,
	ORDER INT UNSIGNED NOT NULL,
	scope_id INT UNSIGNED NOT NULL,
	PRIMARY KEY (id)
) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
 
CREATE TABLE {$prefix}blocks_instances (
	id INT UNSIGNED NOT NULL AUTO_INCREMENT,
	title VARCHAR(255) NOT NULL,
	DATA TEXT,
	TYPE VARCHAR(255) NOT NULL, /* not sure about this one - but how are these stored? */
	PRIMARY KEY (id)
) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
 
CREATE TABLE {$prefix}blocks_scopes (
	id INT UNSIGNED NOT NULL AUTO_INCREMENT,
	scope_name VARCHAR(255) NOT NULL,
	criteria TEXT,
	ORDER INT UNSIGNED NOT NULL,
	PRIMARY KEY (id)
) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Personal tools