Commit 90ed9220 authored by adrian's avatar adrian

add a .install files for the views module

parent 3ecf9163
<?php
function views_install() {
db_query("create table if not exists {view_view} (
vid int(10) unsigned NOT NULL default '0',
name varchar(32) NOT NULL UNIQUE,
description varchar(255),
access varchar(255),
-- page fields
page int(1),
page_title varchar(255),
page_header longtext,
page_header_format int(4) NOT NULL,
page_type varchar(20),
use_pager int(1),
nodes_per_page int(2), -- yes, no more than 99
url varchar(255),
-- menu fields
menu int(1),
menu_tab int(1),
menu_tab_default int(1),
menu_tab_weight int(4),
menu_title varchar(255),
-- block fields
block int(1),
block_title varchar(255),
block_use_page_header int(1),
block_header longtext,
block_header_format int(4) NOT NULL,
block_type varchar(20),
nodes_per_block int(5),
block_more int(1),
-- breadcrumb
breadcrumb_no_home int(1), -- true means start breadcrumb trail from 'Home'.
-- other
changed int(11),
query longtext,
countquery longtext,
PRIMARY KEY (vid),
KEY (name)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
db_query("create table if not exists {view_sort} (
vid int(10) unsigned NOT NULL default '0',
position int(2),
field varchar(255),
sortorder varchar(5),
options varchar(255),
tablename varchar(255),
KEY (vid)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
db_query("create table if not exists {view_argument} (
vid int(10) unsigned NOT NULL default '0',
type varchar(25),
argdefault varchar(255),
title varchar(255),
options varchar(255),
position int(2),
KEY (vid)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
db_query("create table if not exists {view_tablefield} (
vid int(10) unsigned NOT NULL default '0',
tablename varchar(255),
field varchar(255),
label varchar(255),
handler varchar(255),
sortable int(1),
defaultsort varchar(5),
position int(2),
KEY (vid)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
db_query("create table if not exists {view_breadcrumb} (
vid int(10) unsigned NOT NULL default '0',
title varchar(255),
link varchar(255),
position int(2),
KEY (vid)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
db_query("create table if not exists {view_filter} (
vid int(10) unsigned NOT NULL default '0',
tablename varchar(255),
field varchar(255),
value longtext,
operator varchar(20),
options varchar(255),
position int(2),
KEY (vid)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment