# *** uprava nekterych hodnot v tabulce rs_user

update rs_user set admin=2 where admin=1;

# *** pridani sloupce zobraz_zdroj do tabulky rs_links

alter table rs_links add (zobraz_zdroj tinyint unsigned default 1);

# *** pridani sloupce idsekce do tabulky rs_links

alter table rs_links add (idsekce int unsigned not null);

# *** uprava nekterych hodnot v tabulce rs_download

update rs_links set idsekce=1;

# *** zalozeni tabulky rs_links_sekce

create table rs_links_sekce
(
ids int unsigned not null auto_increment,
nazev varchar(60) not null,
hlavnisekce tinyint unsigned default 0,
primary key(ids)
);

# Vlozeni default dat do tabulky rs_links_sekce

insert into rs_links_sekce values
(null,'Základní sekce',1);

# *** zalozeni tabulky rs_plugin

create table rs_plugin
(
idp int unsigned not null auto_increment,
nazev varchar(50) not null,
pristup tinyint unsigned not null,
menu tinyint unsigned not null,
nazev_menu varchar(40),
inclakce_menu varchar(60),
link_menu varchar(60),
sys_blok tinyint unsigned not null,
nazev_blok varchar(50),
zkratka_blok varchar(10),
inclsb_blok varchar(60),
funkce_blok varchar(30),
primary key(idp)
);

# *** zalozeni tabulky rs_stat_data

create table rs_stat_data
(
idd int unsigned not null auto_increment,
datum date not null,
hodina tinyint unsigned not null,
visit int unsigned not null,
pages int unsigned not null,
os_win int unsigned not null,
os_linux int unsigned not null,
os_unix int unsigned not null,
os_mac int unsigned not null,
os_dalsi int unsigned not null,
primary key(idd)
);

# *** zalozeni tabulky rs_stat_arch

create table rs_stat_arch
(
ida int unsigned not null auto_increment,
datum date not null,
hodina tinyint unsigned not null,
visit int unsigned not null,
pages int unsigned not null,
os_win int unsigned not null,
os_linux int unsigned not null,
os_unix int unsigned not null,
os_mac int unsigned not null,
os_dalsi int unsigned not null,
primary key(ida)
);

# *** zalozeni tabulky rs_stat_ip

create table rs_stat_ip
(
idi int unsigned not null auto_increment,
ip varchar(30) not null,
platnost_do datetime not null,
primary key(idi)
);

# *** zalozeni tabulky rs_stat_session

create table rs_stat_session
(
ids int unsigned not null auto_increment,
session varchar(50) not null,
platnost_do datetime not null,
primary key(ids)
);

# *** zalozeni tabulky rs_imggal_sekce

create table rs_imggal_sekce
(
ids int unsigned not null auto_increment,
vlastnik int unsigned not null,
nazev varchar(60),
popis text,
prava varchar(10),
primary key(ids)
);

# *** zalozeni tabulky rs_imggal_obr

create table rs_imggal_obr
(
ido int unsigned not null auto_increment,
vlastnik int unsigned not null,
sekce int unsigned not null,
nazev varchar(60),
popis text,
zamek text,
obr_poloha varchar(80) not null,
obr_width varchar(10),
obr_height varchar(10),
obr_vel varchar(30),
nahl_poloha varchar(80) not null,
nahl_width varchar(10),
nahl_height varchar(10),
primary key(ido)
);

# *** zalozeni tabulky rs_download_sekce

create table rs_download_sekce
(
ids int unsigned not null auto_increment,
nazev varchar(60) not null,
hlavnisekce tinyint unsigned default 0,
primary key(ids)
);

# Vlozeni default dat do tabulky rs_download_sekce

insert into rs_download_sekce values
(null,'Základní sekce',1);

# *** pridani sloupce idsekce do tabulky rs_download

alter table rs_download add (idsekce int unsigned not null);

# *** uprava nekterych hodnot v tabulce rs_download

update rs_download set idsekce=1;

# *** pridani sloupce znacky do tabulky rs_clanky

alter table rs_clanky add (znacky tinyint unsigned default 0);