aboutsummaryrefslogtreecommitdiff
path: root/h-source
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2012-02-11 10:29:58 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2012-02-11 10:29:58 +0000
commiteebbc0eb6ddb7f847b441bc7e3a440949a1efed2 (patch)
tree2cebaa1130915b7cfa3a9261aca5ca3c1644f974 /h-source
parent7145338809ffe8bf126f052956fce8cc9f5d51b8 (diff)
modified tables.sql
Diffstat (limited to 'h-source')
-rw-r--r--h-source/tables.sql840
1 files changed, 536 insertions, 304 deletions
diff --git a/h-source/tables.sql b/h-source/tables.sql
index 2cd87ec..7bfc882 100644
--- a/h-source/tables.sql
+++ b/h-source/tables.sql
@@ -1,304 +1,536 @@
-# h-source, a web software to build a community of people that want to share their hardware information.
-# Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
-#
-# This file is part of h-source
-#
-# h-source is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# h-source is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with h-source. If not, see <http://www.gnu.org/licenses/>.
-
-create table regusers (
- id_user INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
- username VARCHAR(80) binary NOT NULL,
- password CHAR(40) binary NOT NULL,
- last_failure INT UNSIGNED NOT NULL,
- has_confirmed INT UNSIGNED NOT NULL,
- e_mail VARCHAR(60) binary NOT NULL,
- confirmation_token CHAR(32) NOT NULL,
- creation_date timestamp default CURRENT_TIMESTAMP,
- creation_time INT UNSIGNED NOT NULL,
- temp_field CHAR(32) NOT NULL,
- deleted CHAR(4) NOT NULL default 'no',
- blocked CHAR(4) NOT NULL default 'no',
- forgot_token CHAR(32) NOT NULL,
- forgot_time INT UNSIGNED NOT NULL,
- unique(username),
- index(username, password)
-)engine=innodb;
-
-create table reggroups (
- id_group INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
- name VARCHAR(30) binary NOT NULL,
- unique(name)
-)engine=innodb;
-
-create table regusers_groups (
- id_user int(11) UNSIGNED not null,
- id_group int(11) UNSIGNED not null,
- index group_indx(id_group),
- index user_indx(id_user),
- foreign key group_fky(id_group) references reggroups (id_group),
- foreign key user_fky(id_user) references regusers (id_user),
- unique (id_group,id_user)
-)engine=innodb;
-
-CREATE TABLE regsessions (
- uid CHAR(32) NOT NULL,
- token CHAR(32) NOT NULL,
- id_user INT UNSIGNED NOT NULL,
- creation_date INT UNSIGNED NOT NULL,
- user_agent CHAR(32) NOT NULL,
- INDEX(uid)
-)engine=innodb;
-
-
-create table regaccesses (
- id int(12) not null auto_increment primary key,
- ip char(20) not null,data char(10) not null,
- ora char(8) not null,
- username varchar(30) not null
-);
-
-create table hardware (
- id_hard INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
- type varchar(50) not null,
- subtype char(15) not null,
- kernel varchar(50) not null,
- vendor varchar(50) not null,
- model varchar(100) not null,
- created_by int not null,
- updated_by int not null,
- creation_date timestamp default CURRENT_TIMESTAMP,
- update_date datetime not null,
- compatibility char(15) not null,
- description text CHARACTER SET utf8 not null,
- distribution varchar(300) CHARACTER SET utf8 not null,
- video_card_type varchar(100) CHARACTER SET utf8 not null,
- video_card_works varchar(30) CHARACTER SET utf8 not null,
- wifi_type varchar(100) CHARACTER SET utf8 not null,
- wifi_works varchar(30) CHARACTER SET utf8 not null,
- comm_year char(15) not null,
- ask_for_del char(4) not null default 'no',
- deleted char(4) not null default 'no',
- approved char(4) not null default 'yes',
- cleared char(3) not null default 'no',
- pci_id char(10) not null,
- driver varchar(50) not null,
- interface char(15) not null default 'not-specified',
- bios char(15) not null default 'not-specified',
- webcam_type varchar(100) CHARACTER SET utf8 not null,
- webcam_works varchar(30) CHARACTER SET utf8 not null default 'not-specified',
- sound_card_works varchar(30) CHARACTER SET utf8 not null default 'not-specified',
- bluetooth_works varchar(30) CHARACTER SET utf8 not null default 'not-specified',
- fingerprint_works varchar(30) CHARACTER SET utf8 not null default 'not-specified',
- ethernet-card_works varchar(30) CHARACTER SET utf8 not null default 'not-specified',
- sd_card_works varchar(30) CHARACTER SET utf8 not null default 'not-specified',
- it_tracks_users varchar(30) CHARACTER SET utf8 not null default 'not-specified',
- can_free_systems_be_installed varchar(30) CHARACTER SET utf8 not null default 'not-specified',
- architecture char(15) not null default 'not-specified',
- other_names text CHARACTER SET utf8 not null
-)engine=innodb;
-
-create table revisions (
- id_rev INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
- type varchar(50) not null,
- subtype char(15) not null,
- kernel varchar(50) not null,
- vendor varchar(50) not null,
- model varchar(100) not null,
- created_by int not null,
- updated_by int not null,
- creation_date timestamp default CURRENT_TIMESTAMP,
- update_date datetime not null,
- compatibility char(15) not null,
- description text CHARACTER SET utf8 not null,
- distribution varchar(300) CHARACTER SET utf8 not null,
- video_card_type varchar(100) CHARACTER SET utf8 not null,
- video_card_works varchar(30) CHARACTER SET utf8 not null,
- wifi_type varchar(100) CHARACTER SET utf8 not null,
- wifi_works varchar(30) CHARACTER SET utf8 not null,
- comm_year char(15) not null,
- pci_id char(10) not null,
- driver varchar(50) not null,
- interface char(15) not null default 'not-specified',
- bios char(15) not null default 'not-specified',
- webcam_type varchar(100) CHARACTER SET utf8 not null,
- webcam_works varchar(30) CHARACTER SET utf8 not null default 'not-specified',
- sound_card_works varchar(30) CHARACTER SET utf8 not null default 'not-specified',
- bluetooth_works varchar(30) CHARACTER SET utf8 not null default 'not-specified',
- fingerprint_works varchar(30) CHARACTER SET utf8 not null default 'not-specified',
- ethernet-card_works varchar(30) CHARACTER SET utf8 not null default 'not-specified',
- sd_card_works varchar(30) CHARACTER SET utf8 not null default 'not-specified',
- it_tracks_users varchar(30) CHARACTER SET utf8 not null default 'not-specified',
- architecture char(15) not null default 'not-specified',
- other_names text CHARACTER SET utf8 not null,
- approved char(4) not null default 'yes',
- cleared char(3) not null default 'no',
- can_free_systems_be_installed varchar(30) CHARACTER SET utf8 not null default 'not-specified',
- id_hard INT UNSIGNED NOT NULL
-)engine=innodb;
-
-create table hardware_users (
- id_user int(11) UNSIGNED not null,
- id_hard int(11) UNSIGNED not null,
- index hard_indx(id_hard),
- index user_indx(id_user),
- foreign key hard_fky(id_hard) references hardware (id_hard),
- foreign key user_fky(id_user) references regusers (id_user),
- unique (id_user,id_hard)
-)engine=innodb;
-
-create table talk (
- id_talk INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
- created_by int not null,
- creation_date timestamp default CURRENT_TIMESTAMP,
- title varchar(100) CHARACTER SET utf8 not null,
- message text CHARACTER SET utf8 not null,
- id_hard INT UNSIGNED NOT NULL,
- deleted char(4) not null default 'no'
-)engine=innodb;
-
-create table profile (
- id_prof INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
- created_by int not null,
- creation_date timestamp default CURRENT_TIMESTAMP,
- update_date datetime not null,
- real_name varchar(100) CHARACTER SET utf8 not null,
- where_you_are varchar(100) CHARACTER SET utf8 not null,
- birth_date varchar(100) CHARACTER SET utf8 not null,
- fav_distro varchar(100) CHARACTER SET utf8 not null,
- projects text CHARACTER SET utf8 not null ,
- publish_mail char(4) not null default 'no',
- description text CHARACTER SET utf8 not null,
- website varchar(100) CHARACTER SET utf8 not null,
- send_notification char(4) not null default 'yes'
-)engine=innodb;
-
-create table issues (
- id_issue INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
- created_by int not null,
- creation_date timestamp default CURRENT_TIMESTAMP,
- update_date datetime not null,
- topic char(35) CHARACTER SET utf8 not null,
- title varchar(100) CHARACTER SET utf8 not null,
- message text CHARACTER SET utf8 not null,
- priority char(15) CHARACTER SET utf8 not null,
- status char(15) CHARACTER SET utf8 not null,
- notice text CHARACTER SET utf8 not null,
- deleted char(4) not null default 'no'
-)engine=innodb;
-
-create table deletion (
- id_del INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
- created_by int not null,
- creation_date timestamp default CURRENT_TIMESTAMP,
- object char(15) not null,
- message text CHARACTER SET utf8 not null,
- id_hard INT UNSIGNED NOT NULL,
- id_duplicate INT UNSIGNED NOT NULL
-)engine=innodb;
-
-create table params (
- id_par INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
- updating char(4) not null default 'no',
- boxes_xml text CHARACTER SET utf8 not null
-)engine=innodb;
-
-insert into params (updating) values ('no');
-
-create table news (
- id_news INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
- creation_date timestamp default CURRENT_TIMESTAMP,
- title varchar(150) not null,
- message text CHARACTER SET utf8 not null
-)engine=innodb;
-
-
-create table boxes (
- id_box int not null auto_increment primary key,
- creation_date timestamp default CURRENT_TIMESTAMP,
- title varchar(150) not null,
- message text CHARACTER SET utf8 not null
-);
-
-create table messages (
- id_mes int not null auto_increment primary key,
- created_by int not null,
- creation_date timestamp default CURRENT_TIMESTAMP,
- message text CHARACTER SET utf8 not null,
- id_issue INT UNSIGNED NOT NULL,
- deleted char(4) not null default 'no',
- has_read char(4) not null default 'no'
-);
-
-create table history (
- id_history int not null auto_increment primary key,
- created_by int not null,
- creation_date timestamp default CURRENT_TIMESTAMP,
- type char(15) not null,
- action char(15) not null,
- id INT UNSIGNED NOT NULL,
- message text CHARACTER SET utf8 not null,
- gr char(15) not null
-);
-
-insert into reggroups (name) values ('moderator');
-
-
-insert into reggroups (name) values ('admin');
-
-create table wiki (
- id_wiki INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
- created_by int not null,
- creation_date timestamp default CURRENT_TIMESTAMP,
- update_date datetime not null,
- title varchar(200) CHARACTER SET utf8 not null,
- title_clean varchar(200) CHARACTER SET utf8 not null,
- page text CHARACTER SET utf8 not null,
- deleted char(3) not null default 'no',
- blocked CHAR(3) NOT NULL default 'no',
- is_main char(3) not null default 'no'
-)engine=innodb;
-
-create table wiki_revisions (
- id_rev INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
- created_by int not null,
- creation_date timestamp default CURRENT_TIMESTAMP,
- update_date datetime not null,
- title varchar(200) CHARACTER SET utf8 not null,
- title_clean varchar(200) CHARACTER SET utf8 not null,
- page text CHARACTER SET utf8 not null,
- id_wiki INT UNSIGNED NOT NULL
-)engine=innodb;
-
-create table wiki_users (
- id_user int(11) UNSIGNED not null,
- id_wiki int(11) UNSIGNED not null,
- index wiki_indx(id_wiki),
- index user_indx(id_user),
- foreign key wiki_fky(id_wiki) references wiki (id_wiki),
- foreign key user_fky(id_user) references regusers (id_user),
- unique (id_user,id_wiki)
-)engine=innodb;
-
-create table wiki_talk (
- id_talk INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
- created_by int not null,
- creation_date timestamp default CURRENT_TIMESTAMP,
- title varchar(100) CHARACTER SET utf8 not null,
- message text CHARACTER SET utf8 not null,
- id_wiki INT UNSIGNED NOT NULL,
- deleted char(4) not null default 'no'
-)engine=innodb;
-
-insert into wiki (title,title_clean,is_main) values ('Main Page','Main-Page','yes');
-update wiki set update_date=creation_date where title='Main Page'; \ No newline at end of file
+-- phpMyAdmin SQL Dump
+-- version 3.3.9.2
+-- http://www.phpmyadmin.net
+--
+-- Host: localhost
+-- Generation Time: Feb 11, 2012 at 11:26 AM
+-- Server version: 5.1.41
+-- PHP Version: 5.3.2-1ubuntu4.13
+
+SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
+
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `accesses`
+--
+
+CREATE TABLE IF NOT EXISTS `accesses` (
+ `id` int(12) NOT NULL AUTO_INCREMENT,
+ `ip` char(20) NOT NULL,
+ `data` char(10) NOT NULL,
+ `ora` char(8) NOT NULL,
+ `username` varchar(30) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=650 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `admingroups`
+--
+
+CREATE TABLE IF NOT EXISTS `admingroups` (
+ `id_group` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+ PRIMARY KEY (`id_group`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `adminsessions`
+--
+
+CREATE TABLE IF NOT EXISTS `adminsessions` (
+ `uid` char(32) NOT NULL,
+ `token` char(32) NOT NULL,
+ `id_user` int(10) unsigned NOT NULL,
+ `creation_date` int(10) unsigned NOT NULL,
+ `user_agent` char(32) NOT NULL,
+ KEY `uid` (`uid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `adminusers`
+--
+
+CREATE TABLE IF NOT EXISTS `adminusers` (
+ `id_user` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `username` varchar(80) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+ `password` char(40) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+ `last_failure` int(10) unsigned NOT NULL,
+ `has_confirmed` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`id_user`),
+ UNIQUE KEY `username` (`username`),
+ KEY `username_2` (`username`,`password`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `adminusers_groups`
+--
+
+CREATE TABLE IF NOT EXISTS `adminusers_groups` (
+ `id_user` int(11) unsigned NOT NULL,
+ `id_group` int(11) unsigned NOT NULL,
+ UNIQUE KEY `id_group` (`id_group`,`id_user`),
+ KEY `group_indx` (`id_group`),
+ KEY `user_indx` (`id_user`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `boxes`
+--
+
+CREATE TABLE IF NOT EXISTS `boxes` (
+ `id_box` int(11) NOT NULL AUTO_INCREMENT,
+ `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `title` varchar(150) NOT NULL,
+ `message` text NOT NULL,
+ PRIMARY KEY (`id_box`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `deletion`
+--
+
+CREATE TABLE IF NOT EXISTS `deletion` (
+ `id_del` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `created_by` int(11) NOT NULL,
+ `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `object` char(15) NOT NULL,
+ `message` text NOT NULL,
+ `id_hard` int(10) unsigned NOT NULL,
+ `id_duplicate` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`id_del`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `hardware`
+--
+
+CREATE TABLE IF NOT EXISTS `hardware` (
+ `id_hard` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `type` varchar(50) NOT NULL,
+ `kernel` varchar(50) NOT NULL,
+ `vendor` varchar(50) NOT NULL,
+ `model` varchar(100) NOT NULL,
+ `created_by` int(11) NOT NULL,
+ `updated_by` int(11) NOT NULL,
+ `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `update_date` datetime NOT NULL,
+ `compatibility` char(15) NOT NULL,
+ `description` text NOT NULL,
+ `distribution` varchar(300) NOT NULL,
+ `video_card_type` varchar(100) NOT NULL,
+ `video_card_works` varchar(30) NOT NULL,
+ `wifi_type` varchar(100) NOT NULL,
+ `wifi_works` varchar(30) NOT NULL,
+ `comm_year` char(15) NOT NULL,
+ `ask_for_del` char(4) NOT NULL DEFAULT 'no',
+ `deleted` char(4) NOT NULL DEFAULT 'no',
+ `pci_id` char(10) NOT NULL,
+ `subtype` char(15) NOT NULL,
+ `driver` varchar(50) NOT NULL,
+ `interface` char(15) NOT NULL DEFAULT 'not-specified',
+ `bios` char(15) NOT NULL DEFAULT 'not-specified',
+ `webcam_type` varchar(100) NOT NULL,
+ `webcam_works` varchar(30) NOT NULL DEFAULT 'not-specified',
+ `sound_card_works` varchar(30) NOT NULL DEFAULT 'not-specified',
+ `bluetooth_works` varchar(30) NOT NULL DEFAULT 'not-specified',
+ `fingerprint_works` varchar(30) NOT NULL DEFAULT 'not-specified',
+ `architecture` char(15) NOT NULL DEFAULT 'not-specified',
+ `other_names` text NOT NULL,
+ `approved` char(4) NOT NULL DEFAULT 'yes',
+ `cleared` char(3) NOT NULL DEFAULT 'no',
+ `ethernet_card_works` varchar(30) NOT NULL DEFAULT 'not-specified',
+ `sd_card_works` varchar(30) NOT NULL DEFAULT 'not-specified',
+ `can_free_systems_be_installed` varchar(30) NOT NULL DEFAULT 'not-specified',
+ `it_tracks_users` varchar(30) NOT NULL DEFAULT 'not-specified',
+ PRIMARY KEY (`id_hard`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=503 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `hardware_users`
+--
+
+CREATE TABLE IF NOT EXISTS `hardware_users` (
+ `id_user` int(11) unsigned NOT NULL,
+ `id_hard` int(11) unsigned NOT NULL,
+ UNIQUE KEY `id_user` (`id_user`,`id_hard`),
+ KEY `hard_indx` (`id_hard`),
+ KEY `user_indx` (`id_user`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `history`
+--
+
+CREATE TABLE IF NOT EXISTS `history` (
+ `id_history` int(11) NOT NULL AUTO_INCREMENT,
+ `created_by` int(11) NOT NULL,
+ `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `type` char(15) NOT NULL,
+ `action` char(15) NOT NULL,
+ `id` int(10) unsigned NOT NULL,
+ `message` text NOT NULL,
+ `gr` char(15) NOT NULL,
+ PRIMARY KEY (`id_history`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1367 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `issues`
+--
+
+CREATE TABLE IF NOT EXISTS `issues` (
+ `id_issue` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `created_by` int(11) NOT NULL,
+ `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `update_date` datetime NOT NULL,
+ `topic` char(35) NOT NULL,
+ `title` varchar(100) NOT NULL,
+ `message` text NOT NULL,
+ `priority` char(15) NOT NULL,
+ `status` char(15) NOT NULL,
+ `notice` text NOT NULL,
+ `deleted` char(4) NOT NULL DEFAULT 'no',
+ PRIMARY KEY (`id_issue`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=106 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `messages`
+--
+
+CREATE TABLE IF NOT EXISTS `messages` (
+ `id_mes` int(11) NOT NULL AUTO_INCREMENT,
+ `created_by` int(11) NOT NULL,
+ `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `message` text NOT NULL,
+ `id_issue` int(10) unsigned NOT NULL,
+ `deleted` char(4) NOT NULL DEFAULT 'no',
+ `has_read` char(4) NOT NULL DEFAULT 'no',
+ PRIMARY KEY (`id_mes`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=342 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `news`
+--
+
+CREATE TABLE IF NOT EXISTS `news` (
+ `id_news` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `title` varchar(150) NOT NULL,
+ `message` text NOT NULL,
+ PRIMARY KEY (`id_news`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `params`
+--
+
+CREATE TABLE IF NOT EXISTS `params` (
+ `id_par` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `updating` char(4) NOT NULL DEFAULT 'no',
+ `boxes_xml` text NOT NULL,
+ PRIMARY KEY (`id_par`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `profile`
+--
+
+CREATE TABLE IF NOT EXISTS `profile` (
+ `id_prof` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `created_by` int(11) NOT NULL,
+ `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `update_date` datetime NOT NULL,
+ `real_name` varchar(100) NOT NULL,
+ `where_you_are` varchar(100) NOT NULL,
+ `birth_date` varchar(100) NOT NULL,
+ `fav_distro` varchar(100) NOT NULL,
+ `projects` text NOT NULL,
+ `publish_mail` char(4) NOT NULL DEFAULT 'no',
+ `description` text NOT NULL,
+ `website` varchar(100) NOT NULL,
+ `send_notification` char(4) NOT NULL DEFAULT 'yes',
+ PRIMARY KEY (`id_prof`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=330 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `regaccesses`
+--
+
+CREATE TABLE IF NOT EXISTS `regaccesses` (
+ `id` int(12) NOT NULL AUTO_INCREMENT,
+ `ip` char(20) NOT NULL,
+ `data` char(10) NOT NULL,
+ `ora` char(8) NOT NULL,
+ `username` varchar(30) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3529 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `reggroups`
+--
+
+CREATE TABLE IF NOT EXISTS `reggroups` (
+ `id_group` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+ PRIMARY KEY (`id_group`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `regsessions`
+--
+
+CREATE TABLE IF NOT EXISTS `regsessions` (
+ `uid` char(32) NOT NULL,
+ `token` char(32) NOT NULL,
+ `id_user` int(10) unsigned NOT NULL,
+ `creation_date` int(10) unsigned NOT NULL,
+ `user_agent` char(32) NOT NULL,
+ KEY `uid` (`uid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `regusers`
+--
+
+CREATE TABLE IF NOT EXISTS `regusers` (
+ `id_user` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `username` varchar(80) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+ `password` char(40) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+ `last_failure` int(10) unsigned NOT NULL,
+ `has_confirmed` int(10) unsigned NOT NULL,
+ `e_mail` varchar(60) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+ `confirmation_token` char(32) NOT NULL,
+ `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `creation_time` int(10) unsigned NOT NULL,
+ `temp_field` char(32) NOT NULL,
+ `deleted` char(4) NOT NULL DEFAULT 'no',
+ `forgot_token` char(32) NOT NULL,
+ `forgot_time` int(10) unsigned NOT NULL,
+ `blocked` char(4) NOT NULL DEFAULT 'no',
+ PRIMARY KEY (`id_user`),
+ UNIQUE KEY `username` (`username`),
+ KEY `username_2` (`username`,`password`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=463 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `regusers_groups`
+--
+
+CREATE TABLE IF NOT EXISTS `regusers_groups` (
+ `id_user` int(11) unsigned NOT NULL,
+ `id_group` int(11) unsigned NOT NULL,
+ UNIQUE KEY `id_group` (`id_group`,`id_user`),
+ KEY `group_indx` (`id_group`),
+ KEY `user_indx` (`id_user`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `revisions`
+--
+
+CREATE TABLE IF NOT EXISTS `revisions` (
+ `id_rev` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `type` varchar(50) NOT NULL,
+ `kernel` varchar(50) NOT NULL,
+ `vendor` varchar(50) NOT NULL,
+ `model` varchar(100) NOT NULL,
+ `created_by` int(11) NOT NULL,
+ `updated_by` int(11) NOT NULL,
+ `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `update_date` datetime NOT NULL,
+ `compatibility` char(15) NOT NULL,
+ `description` text NOT NULL,
+ `distribution` varchar(300) NOT NULL,
+ `video_card_type` varchar(100) NOT NULL,
+ `video_card_works` varchar(30) NOT NULL,
+ `wifi_type` varchar(100) NOT NULL,
+ `wifi_works` varchar(30) NOT NULL,
+ `comm_year` char(15) NOT NULL,
+ `id_hard` int(10) unsigned NOT NULL,
+ `pci_id` char(10) NOT NULL,
+ `subtype` char(15) NOT NULL,
+ `driver` varchar(50) NOT NULL,
+ `interface` char(15) NOT NULL DEFAULT 'not-specified',
+ `bios` char(15) NOT NULL DEFAULT 'not-specified',
+ `webcam_type` varchar(100) NOT NULL,
+ `webcam_works` varchar(30) NOT NULL DEFAULT 'not-specified',
+ `sound_card_works` varchar(30) NOT NULL DEFAULT 'not-specified',
+ `bluetooth_works` varchar(30) NOT NULL DEFAULT 'not-specified',
+ `fingerprint_works` varchar(30) NOT NULL DEFAULT 'not-specified',
+ `architecture` char(15) NOT NULL DEFAULT 'not-specified',
+ `other_names` text NOT NULL,
+ `approved` char(4) NOT NULL DEFAULT 'yes',
+ `cleared` char(3) NOT NULL DEFAULT 'no',
+ `ethernet_card_works` varchar(30) NOT NULL DEFAULT 'not-specified',
+ `sd_card_works` varchar(30) NOT NULL DEFAULT 'not-specified',
+ `can_free_systems_be_installed` varchar(30) NOT NULL DEFAULT 'not-specified',
+ `it_tracks_users` varchar(30) NOT NULL DEFAULT 'not-specified',
+ PRIMARY KEY (`id_rev`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=627 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `talk`
+--
+
+CREATE TABLE IF NOT EXISTS `talk` (
+ `id_talk` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `created_by` int(11) NOT NULL,
+ `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `title` varchar(100) NOT NULL,
+ `message` text NOT NULL,
+ `id_hard` int(10) unsigned NOT NULL,
+ `deleted` char(4) NOT NULL DEFAULT 'no',
+ PRIMARY KEY (`id_talk`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=259 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `wiki`
+--
+
+CREATE TABLE IF NOT EXISTS `wiki` (
+ `id_wiki` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `created_by` int(11) NOT NULL,
+ `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `update_date` datetime NOT NULL,
+ `title` varchar(200) NOT NULL,
+ `title_clean` varchar(200) NOT NULL,
+ `page` text NOT NULL,
+ `deleted` char(3) NOT NULL DEFAULT 'no',
+ `blocked` char(3) NOT NULL DEFAULT 'no',
+ `is_main` char(3) NOT NULL DEFAULT 'no',
+ PRIMARY KEY (`id_wiki`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=30 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `wiki_revisions`
+--
+
+CREATE TABLE IF NOT EXISTS `wiki_revisions` (
+ `id_rev` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `created_by` int(11) NOT NULL,
+ `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `update_date` datetime NOT NULL,
+ `title` varchar(200) NOT NULL,
+ `title_clean` varchar(200) NOT NULL,
+ `page` text NOT NULL,
+ `id_wiki` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`id_rev`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=252 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `wiki_talk`
+--
+
+CREATE TABLE IF NOT EXISTS `wiki_talk` (
+ `id_talk` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `created_by` int(11) NOT NULL,
+ `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `title` varchar(100) NOT NULL,
+ `message` text NOT NULL,
+ `id_wiki` int(10) unsigned NOT NULL,
+ `deleted` char(4) NOT NULL DEFAULT 'no',
+ PRIMARY KEY (`id_talk`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `wiki_users`
+--
+
+CREATE TABLE IF NOT EXISTS `wiki_users` (
+ `id_user` int(11) unsigned NOT NULL,
+ `id_wiki` int(11) unsigned NOT NULL,
+ UNIQUE KEY `id_user` (`id_user`,`id_wiki`),
+ KEY `wiki_indx` (`id_wiki`),
+ KEY `user_indx` (`id_user`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Constraints for dumped tables
+--
+
+--
+-- Constraints for table `adminusers_groups`
+--
+ALTER TABLE `adminusers_groups`
+ ADD CONSTRAINT `adminusers_groups_ibfk_1` FOREIGN KEY (`id_group`) REFERENCES `admingroups` (`id_group`),
+ ADD CONSTRAINT `adminusers_groups_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `adminusers` (`id_user`);
+
+--
+-- Constraints for table `hardware_users`
+--
+ALTER TABLE `hardware_users`
+ ADD CONSTRAINT `hardware_users_ibfk_1` FOREIGN KEY (`id_hard`) REFERENCES `hardware` (`id_hard`),
+ ADD CONSTRAINT `hardware_users_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `regusers` (`id_user`);
+
+--
+-- Constraints for table `regusers_groups`
+--
+ALTER TABLE `regusers_groups`
+ ADD CONSTRAINT `regusers_groups_ibfk_1` FOREIGN KEY (`id_group`) REFERENCES `reggroups` (`id_group`),
+ ADD CONSTRAINT `regusers_groups_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `regusers` (`id_user`);
+
+--
+-- Constraints for table `wiki_users`
+--
+ALTER TABLE `wiki_users`
+ ADD CONSTRAINT `wiki_users_ibfk_1` FOREIGN KEY (`id_wiki`) REFERENCES `wiki` (`id_wiki`),
+ ADD CONSTRAINT `wiki_users_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `regusers` (`id_user`);