As of version 4.7, modules authors can use .install files to do module setup work. I have problem with that.
It seems that .install file can't run on my site. How to run .install file manually? I was trying to install views.module.

error massege: user warning: Table 'site_site.view_view' doesn't exist query: SELECT * FROM view_view WHERE page = 1 in /home/site/public_html/includes/database.mysql.inc on line 120.

Thanks,

Gaba

Comments

niosop’s picture

Is your database really named site_site? If not, check your $db_prefix in /home/site/public_html/sites/default/settings.php

heine’s picture

$db_prefix is actually the prefix of the table ;-) A bit of a misnomer perhaps.
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

niosop’s picture

Ahhh, thanks. I never use it, so I never would have noticed that. Where would the site_site be coming from then? From $db_url?

heine’s picture

That's the databasename that MySQL tacks onto the tablename in the error message it returns.
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

heine’s picture

Gaba,

What exact versions of Drupal and Views are you using? You can extract the queries from the .install file (this is from views 4.7):

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_empty longtext,
        page_empty_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_use_page_empty int(1),
        block_empty longtext,
        block_empty_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 */;

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 */;

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 */;

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 */;

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 */;

CREATE TABLE if not exists view_exposed_filter (
        vid int(10) unsigned NOT NULL default '0',
        field varchar(255),
        label varchar(255),
        optional int(1),
        is_default int(1),
        operator int(1),
        single int(1),
        position int(2),
        KEY (vid)
      ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;

--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

gaba’s picture

Thank you very much,

that solved my problem. But I wonder why that .install file didn't start after module activation. I using Drupal 4,7 RC3.