function node_install() db_sqlapi_install('node') db_query("INSERT INTO {node_access} VALUES (0, 0, 'all', 1, 0, 0);"); end function node_schema() return { ['node'] = { ['fields'] = { ['nid'] = {['type'] = 'serial', ['unsigned'] = true, ['not null'] = true}, ['vid'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = '', ['default'] = 0}, ['type'] = {['type'] = 'varchar', ['length'] = 32, ['not null'] = true, ['default'] = ''}, ['language'] = {['type'] = 'varchar', ['length'] = 12, ['not null'] = true, ['default'] = ''}, ['title'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = true, ['default'] = ''}, ['uid'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['status'] = {['type'] = 'int', ['not null'] = true, ['default'] = 1}, ['created'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['changed'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['comment'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['promote'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['moderate'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['sticky'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['tnid'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0}, ['translate'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0} }, ['indexes'] = { ['nid'] = {'nid'}, ['node_changed'] = {'changed'}, ['node_created'] = {'created'}, ['node_moderate'] = {'moderate'}, ['node_promote_status'] = {'promote', 'status'}, ['node_status_type'] = {'status','type', 'nid'}, ['node_title_type'] = {'title', {'type', 4}}, ['node_type'] = {{'type', 4}}, ['status'] = {'status'}, ['uid'] = {'uid'}, ['tnid'] = {'tnid'}, ['translate'] = {'translate'}}, ['unique keys'] = { ['nid_vid'] = {'nid','vid'}, ['vid'] = { 'vid'}}, ['primary key'] = { 'nid'}}, ['node_access'] = { ['fields'] = { ['nid'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0}, ['gid'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0}, ['realm'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = true, ['default'] = ''}, ['grant_view'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0, ['size'] = 'tiny'}, ['grant_update'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0, ['size'] = 'tiny'}, ['grant_delete'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0, ['size'] = 'tiny'} }, ['primary key'] = {'nid','gid','realm'} }, ['node_counter'] = { ['fields'] = {['nid'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['totalcount'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0, ['size'] = 'big'}, ['daycount'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0, ['size'] = 'medium'}, ['timestamp'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0} }, ['primary key'] = {'nid'} }, ['node_revisions'] = { ['fields'] = { ['nid'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0}, ['vid'] = {['type'] = 'serial', ['unsigned'] = true, ['not null'] = true}, ['uid'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['title'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = true, ['default'] = ''}, ['body'] = {['type'] = 'text', ['not null'] = true, ['size'] = 'big'}, ['teaser'] = {['type'] = 'text', ['not null'] = true, ['size'] = 'big'}, ['log'] = {['type'] = 'text', ['not null'] = true, ['size'] = 'big'}, ['timestamp'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['format'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0} }, ['indexes'] = {['nid'] = {'nid'}, ['uid'] = {'uid'}}, ['primary key'] = {'vid'} }, ['node_type'] = { ['fields'] = { ['type'] = {['type'] = 'varchar', ['length'] = 32, ['not null'] = true}, ['name'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = true, ['default'] = ''}, ['module'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = true}, ['description'] = {['type'] = 'text', ['not null'] = true, ['size'] = 'medium'}, ['help'] = {['type'] = 'text', ['not null'] = true, ['size'] = 'medium'}, ['has_title'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['size'] = 'tiny'}, ['title_label'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = true, ['default'] = ''}, ['has_body'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['size'] = 'tiny'}, ['body_label'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = true, ['default'] = ''}, ['min_word_count'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['size'] = 'small'}, ['custom'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0, ['size'] = 'tiny'}, ['modified'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0, ['size'] = 'tiny'}, ['locked'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0, ['size'] = 'tiny'}, ['orig_type'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = true, ['default'] = ''} }, ['primary key'] = {'type'} } } end