X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/641204dfbdb9fc870cdd2e7f9e3169a44693e7bf..26d0f6771b042eed3fb2ee64e5a2ec0686ea0737:/projects/stargazer/inst/var/00-base-00.sql

diff --git a/projects/stargazer/inst/var/00-base-00.sql b/projects/stargazer/inst/var/00-base-00.sql
index 4047bc1f..a452d810 100644
--- a/projects/stargazer/inst/var/00-base-00.sql
+++ b/projects/stargazer/inst/var/00-base-00.sql
@@ -31,9 +31,6 @@
  *          1 - down - ÑÑÐ¸ÑÐ°ÐµÑÑÑ Ð¿Ð¾ download
  *          2 - max - ÑÑÐ¸ÑÐ°ÐµÑÑÑ Ð¿Ð¾ Ð¼Ð°ÐºÑÐ¸Ð¼Ð°Ð»ÑÐ½Ð¾Ð¼Ñ ÑÑÐµÐ´Ð¸ upload/download
  *          3 - up+down - ÑÑÐ¸ÑÐ°ÐµÑÑÑ Ð¿Ð¾ ÑÑÐ¼Ð¼Ðµ upload Ð¸ download
- *        ÐÐ°Ðº Ð°Ð»ÑÑÐµÑÐ½Ð°ÑÐ¸Ð²Ñ ÑÑÐ¾Ð¼Ñ Ð¿Ð¾Ð»Ñ Ð¼Ð¾Ð¶Ð½Ð¾ ÑÐ´ÐµÐ»Ð°ÑÑ ÐµÑÐµ Ð¾Ð´Ð½Ñ ÑÐ°Ð±Ð»Ð¸ÑÑ - ÑÐ¸Ð¿Ð¾Ð²
- *        Ð¿Ð¾Ð´ÑÑÐµÑÐ° ÑÑÐ°ÑÐ¸ÐºÐ°. Ð Ð² ÑÑÐ¾Ð¼ Ð¿Ð¾Ð»Ðµ ÑÑÐ°Ð½Ð¸ÑÑ ÑÑÑÐ»ÐºÑ Ð½Ð° ÑÑÑ ÑÐ°Ð±Ð»Ð¸ÑÑ.
- *        ÐÐ¾Ð¿ÑÐ¾Ñ ÑÐ¾Ð»ÑÐºÐ¾ "Ð Ð½Ð°Ð´Ð¾ Ð»Ð¸ ÑÑÐ¾?"
  *
  *      * dm_ip. IP Ð°Ð´ÑÐµÑÑ Ð² Ð²Ð¸Ð´Ðµ ÑÐµÑÑÑÐµÑ Ð±Ð°Ð¹ÑÐ¾Ð²Ð¾Ð³Ð¾ ÑÐµÐ»Ð¾Ð³Ð¾ ÑÐ¸ÑÐ»Ð° ÑÐ¾ Ð·Ð½Ð°ÐºÐ¾Ð¼.
  *        ÐÑÐ¿Ð¾Ð»Ð½ÑÑÑ Ð¿ÑÐ¸Ð²ÐµÐ´ÐµÐ½Ð¸Ðµ Ðº Ð·Ð½Ð°ÐºÐ¾Ð²ÑÐ¼Ñ ÑÐµÐ»Ð¾Ð¼Ñ Ð¿ÑÐ¸ Ð·Ð°Ð½ÐµÑÐµÐ½Ð¸Ð¸ IP Ð² ÐÐ!!!
@@ -99,15 +96,15 @@ CREATE DOMAIN dm_phone AS VARCHAR(256) DEFAULT '';
 CREATE DOMAIN dm_user_name AS VARCHAR(256) DEFAULT '';
 CREATE DOMAIN dm_service_comment AS VARCHAR(256) DEFAULT '';
 CREATE DOMAIN dm_service_name AS VARCHAR(32) DEFAULT '';
-/* TODO: why 0-31? Which is default? */
+
 CREATE DOMAIN dm_pay_day AS SMALLINT NOT NULL
     CHECK ( VALUE BETWEEN 0 AND 31 );
 CREATE DOMAIN dm_period AS INTEGER NOT NULL;
 CREATE DOMAIN dm_counter AS SMALLINT NOT NULL;
-/* Is it needded? */
+
 CREATE DOMAIN dm_message_ver AS INTEGER NOT NULL;
 CREATE DOMAIN dm_message_type AS INTEGER NOT NULL;
-/*----------------*/
+
 CREATE DOMAIN dm_message AS VARCHAR(256) NOT NULL;
 CREATE DOMAIN dm_user_data AS VARCHAR(256) NOT NULL;
 CREATE DOMAIN dm_session_event_type AS CHAR(1) NOT NULL
@@ -278,7 +275,7 @@ CREATE TABLE tb_users_data
 (
     pk_user_data dm_id PRIMARY KEY,
     fk_user dm_id,
-    num dm_num, /* data_id dm_id renamed */
+    num dm_num,
     data dm_user_data,
 
     FOREIGN KEY (fk_user) REFERENCES tb_users (pk_user)
@@ -407,16 +404,6 @@ BEGIN
 END !!
 SET TERM ; !!
 
-/*set term !! ;
-create trigger tr_tariff_bi for tb_tariffs active
-before insert position 0
-as
-begin
-    if (new.pk_tariff is null)
-    then new.pk_tariff = gen_id(gn_pk_tariff, 1);
-end !!
-set term ; !!*/
-
 set term !! ;
 create trigger tr_tariff_param_bi for tb_tariffs_params active
 before insert position 0
@@ -437,16 +424,6 @@ begin
 end !!
 set term ; !!
 
-/*set term !! ;
-create trigger tr_user_bi for tb_users active
-before insert position 0
-as
-begin
-    if (new.pk_user is null)
-    then new.pk_user = gen_id(gn_pk_user, 1);
-end !!
-set term ; !!*/
-
 set term !! ;
 create trigger tr_detail_stat_bi for tb_detail_stats active
 before insert position 0
@@ -477,26 +454,6 @@ begin
 end !!
 set term ; !!
 
-/*set term !! ;
-create trigger tr_message_bi for tb_messages active
-before insert position 0
-as
-begin
-    if (new.pk_message is null)
-    then new.pk_message = gen_id(gn_pk_message, 1);
-end !!
-set term ; !!*/
-
-/*set term !! ;
-create trigger tr_stat_bi for tb_stats active
-before insert position 0
-as
-begin
-    if (new.pk_stat is null)
-    then new.pk_stat = gen_id(gn_pk_stat, 1);
-end !!
-set term ; !!*/
-
 set term !! ;
 create trigger tr_stat_traffic_bi for tb_stats_traffic active
 before insert position 0
@@ -527,16 +484,6 @@ begin
 end !!
 set term ; !!
 
-/*set term !! ;
-create trigger tr_session_log_bi for tb_sessions_log active
-before insert position 0
-as
-begin
-    if (new.pk_session_log is null)
-    then new.pk_session_log = gen_id(gn_pk_session_log, 1);
-end !!
-set term ; !!*/
-
 set term !! ;
 create trigger tr_session_data_bi for tb_sessions_data active
 before insert position 0
@@ -728,4 +675,3 @@ set term ; !!
 insert into tb_admins values(0, 'admin', 'geahonjehjfofnhammefahbbbfbmpkmkmmefahbbbfbmpkmkmmefahbbbfbmpkmk', 1, 1, 1, 1, 1, 1, 1, 1, 1);
 
 /* EOF */
-
