Просмотр файла tabulas.sql

Размер файла: 7.83Kb
CREATE TABLE IF NOT EXISTS `apmeklejumi` (
  `aid` int(200) NOT NULL auto_increment,
  `kas` int(100) NOT NULL,
  `ko` int(100) NOT NULL,
  `laiks` bigint(13) NOT NULL,
  UNIQUE KEY `aid` (`aid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `atskaites` (
  `atid` int(100) NOT NULL auto_increment,
  `kas` int(100) NOT NULL,
  `darbiba` varchar(150) NOT NULL,
  `laiks` bigint(13) NOT NULL,
  `parbaudits` enum('1','2') NOT NULL default '1' COMMENT '1 - nepārbaudīts, 2 - pārbaudīts',
  UNIQUE KEY `atid` (`atid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `bkomentari` (
  `kid` int(100) NOT NULL auto_increment,
  `gid` int(100) NOT NULL,
  `komentars` varchar(300) NOT NULL,
  `laiks` bigint(13) NOT NULL,
  `id` int(100) NOT NULL,
  UNIQUE KEY `kid` (`kid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `blkomentari` (
  `kid` int(100) NOT NULL auto_increment,
  `bid` int(100) NOT NULL,
  `komentars` varchar(300) NOT NULL,
  `laiks` bigint(13) NOT NULL,
  `id` int(100) NOT NULL,
  UNIQUE KEY `kid` (`kid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `blogi` (
  `bid` int(200) NOT NULL auto_increment,
  `id` int(100) NOT NULL,
  `nosaukums` varchar(50) NOT NULL,
  `teksts` varchar(2800) NOT NULL,
  `laiks` bigint(13) NOT NULL,
  `labots_laiks` bigint(13) NOT NULL default '0',
  `lasits` int(200) NOT NULL default '0',
  UNIQUE KEY `bid` (`bid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `foruma_apakstemas` (
  `aid` int(200) NOT NULL auto_increment,
  `tid` int(200) NOT NULL,
  `id` int(100) NOT NULL,
  `nosaukums` varchar(100) NOT NULL,
  `teksts` varchar(1024) NOT NULL,
  `laiks` bigint(13) NOT NULL,
  `statuss` enum('1','2') NOT NULL default '1' COMMENT '1 - atvērta tēma, 2 - aizvērta tēma',
  `ped_rakstits` bigint(13) NOT NULL,
  UNIQUE KEY `aid` (`aid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `foruma_teksti` (
  `tkid` int(200) NOT NULL auto_increment,
  `tid` int(200) NOT NULL,
  `aid` int(200) NOT NULL,
  `id` int(100) NOT NULL,
  `teksts` varchar(1024) NOT NULL,
  `laiks` bigint(13) NOT NULL,
  `labots_laiks` bigint(13) NOT NULL default '0',
  UNIQUE KEY `tkid` (`tkid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `foruma_temas` (
  `tid` int(200) NOT NULL auto_increment,
  `id` int(100) NOT NULL,
  `nosaukums` varchar(100) NOT NULL,
  `laiks` bigint(13) NOT NULL,
  UNIQUE KEY `tid` (`tid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `galerija` (
  `gid` int(100) NOT NULL auto_increment,
  `id` int(100) NOT NULL,
  `bilde` varchar(60) NOT NULL,
  `laiks` bigint(13) NOT NULL,
  `radit` enum('1','2') NOT NULL default '1',
  `komentars` varchar(100) NOT NULL,
  UNIQUE KEY `gid` (`gid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `ielades_faili` (
  `fid` int(200) NOT NULL auto_increment,
  `fails` varchar(200) NOT NULL,
  `mape` varchar(100) NOT NULL,
  `nosaukums` varchar(60) NOT NULL,
  `apraksts` varchar(512) NOT NULL,
  `ieladets` int(200) NOT NULL default '0',
  `pedeja_ielade` bigint(13) NOT NULL,
  UNIQUE KEY `iid` (`fid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `ielades_mapes` (
  `mid` int(200) NOT NULL auto_increment,
  `nosaukums` varchar(200) NOT NULL,
  `mape` varchar(100) NOT NULL,
  UNIQUE KEY `mid` (`mid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `jaunumi` (
  `jid` int(200) NOT NULL auto_increment,
  `teksts` varchar(512) NOT NULL,
  `laiks` bigint(13) NOT NULL,
  UNIQUE KEY `jid` (`jid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `jkomentari` (
  `kid` int(100) NOT NULL auto_increment,
  `jid` int(100) NOT NULL,
  `komentars` varchar(300) NOT NULL,
  `laiks` bigint(13) NOT NULL,
  `id` int(100) NOT NULL,
  UNIQUE KEY `kid` (`kid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `lietotaji` (
  `id` int(100) NOT NULL auto_increment,
  `niks` varchar(12) NOT NULL,
  `parole` varchar(12) NOT NULL,
  `reg_laiks` bigint(13) NOT NULL,
  `ped_aktivitate` bigint(13) NOT NULL,
  `ped_ienaksana` bigint(13) NOT NULL,
  `amats` enum('1','2','3') NOT NULL default '1' COMMENT '1 - parasts lietotājs, 2 - palīgs, 3 - īpašnieks',
  `punkti` bigint(10) NOT NULL default '500',
  `dzimene` bigint(13) NOT NULL,
  `dzimums` enum('v','s') NOT NULL default 'v',
  `dzivesvieta` varchar(50) NOT NULL,
  `kontaktinfo` varchar(150) NOT NULL,
  `par_sevi` varchar(300) NOT NULL,
  `online_laiks` bigint(13) NOT NULL default '0',
  `ip` varchar(70) NOT NULL,
  `browseris` varchar(200) NOT NULL,
  `kliki` bigint(20) NOT NULL default '0',
  `smaidi` enum('1','2') NOT NULL default '1',
  `css_stils` varchar(50) NOT NULL,
  `skatijas` int(200) NOT NULL default '0',
  `vg_skaits` int(2) NOT NULL default '0' COMMENT 'tekstu skaits lapā viesu grāmatā',
  `bk_skaits` int(2) NOT NULL default '0' COMMENT 'bildes komentāru skaits lapā',
  `ap_skaits` int(2) NOT NULL default '0' COMMENT 'foruma apakštēmu skaits lapā',
  `tk_skaits` int(2) NOT NULL default '0' COMMENT 'foruma komentāru skaits lapā',
  `on_skaits` int(2) NOT NULL default '0' COMMENT 'online apmeklētāju skaits lapā',
  `ja_skaits` int(2) NOT NULL COMMENT 'jaumumu skaits lapā',
  `bl_skaits` int(2) NOT NULL COMMENT 'blogu skaits lapā',
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `linki` (
  `lid` int(200) NOT NULL auto_increment,
  `links` varchar(100) NOT NULL,
  `nosaukums` varchar(120) NOT NULL,
  UNIQUE KEY `lid` (`lid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `nobanotie` (
  `bid` int(100) NOT NULL auto_increment,
  `kas` varchar(150) NOT NULL,
  `iemesls` varchar(100) NOT NULL,
  `laiks` bigint(13) NOT NULL,
  UNIQUE KEY `bid` (`bid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `online` (
  `oid` int(100) NOT NULL auto_increment,
  `id` int(100) NOT NULL,
  `sesija` varchar(13) NOT NULL,
  `laiks` bigint(13) NOT NULL,
  `browseris` varchar(200) NOT NULL,
  `ip` varchar(70) NOT NULL,
  `kur` varchar(50) NOT NULL,
  `teksts` varchar(60) NOT NULL,
  UNIQUE KEY `oid` (`oid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `pasts` (
  `pid` int(200) NOT NULL auto_increment,
  `kam` int(100) NOT NULL,
  `no_ka` int(100) NOT NULL,
  `vestule` varchar(512) NOT NULL,
  `laiks` bigint(13) NOT NULL,
  `lasita` enum('1','2') NOT NULL default '1' COMMENT '1 - nelasīta, 2 - lasīta',
  UNIQUE KEY `pid` (`pid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE IF NOT EXISTS `viesugramata` (
  `vid` int(100) NOT NULL auto_increment,
  `id` int(100) NOT NULL,
  `teksts` varchar(512) NOT NULL,
  `laiks` bigint(13) NOT NULL,
  `atbilde` varchar(512) NOT NULL,
  UNIQUE KEY `vid` (`vid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

++++++

CREATE TABLE `aptaujas` (
  `apid` int(200) NOT NULL auto_increment,
  `id` int(100) NOT NULL,
  `jautajums` varchar(100) NOT NULL,
  `atbilde1` varchar(100) NOT NULL,
  `atbilde2` varchar(100) NOT NULL,
  `atbilde3` varchar(100) NOT NULL,
  `atbilde4` varchar(100) NOT NULL,
  `atbilde5` varchar(100) NOT NULL,
  `laiks` bigint(13) NOT NULL,
  UNIQUE KEY `apid` (`apid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

++++++

CREATE TABLE `aptauju_atbildes` (
  `atid` int(200) NOT NULL auto_increment,
  `apid` int(200) NOT NULL,
  `id` int(100) NOT NULL,
  `atbilde` varchar(8) NOT NULL,
  UNIQUE KEY `atid` (`atid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;