function profile_install() db_sqlapi_install('profile') end function profile_schema() return { ['profile_fields'] = { ['fields'] = { ['fid'] = {['type'] = 'serial', ['not null'] = true}, ['title'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = ''}, ['name'] = {['type'] = 'varchar', ['length'] = 128, ['not null'] = ''}, ['explanation'] = {['type'] = 'text', ['not null'] = ''}, ['category'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = ''}, ['page'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = ''}, ['type'] = {['type'] = 'varchar', ['length'] = 128, ['not null'] = ''}, ['weight'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0, ['size'] = 'tiny'}, ['required'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0, ['size'] = 'tiny'}, ['register'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0, ['size'] = 'tiny'}, ['visibility'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0, ['size'] = 'tiny'}, ['autocomplete'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0, ['size'] = 'tiny'}, ['options'] = {['type'] = 'text', ['not null'] = ''}}, ['indexes'] = { ['category'] = {'category'}}, ['unique keys'] = { ['name'] = {'name'}}, ['primary key'] = {'fid'}}, ['profile_values'] = { ['fields'] = { ['fid'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = '', ['default'] = 0}, ['uid'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = '', ['default'] = 0}, ['value'] = {['type'] = 'text', ['not null'] = ''}}, ['indexes'] = { ['fid'] = {'fid'}, ['uid'] = {'uid'}}}} end