Commit 00f6a343 authored by mitshel's avatar mitshel
Browse files

Создан файл update014-015 для перехода между версиями 0.14 и 0.15

parent 2377522e
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
update dbver set ver="0.15";
update authors set first_name="" where author_id=1;

DROP PROCEDURE IF EXISTS sp_newinfo;

DELIMITER //

CREATE PROCEDURE sp_newinfo(period INT)
BEGIN
  DECLARE min_book_id INT;

  select MIN(book_id) into min_book_id from books where registerdate>now()-INTERVAL period DAY;
  select 1 s, count(*) from books where book_id>=min_book_id and avail!=0 and doublicat=0
  union all
  select 2 s, count(*) from (select author_id from bauthors where book_id>=min_book_id group by author_id) a
  union all
  select 3 s, count(*) from (select genre_id from bgenres where book_id>=min_book_id group by genre_id) a
  union all
  select 4 s, count(*) from (select ser_id from bseries where book_id>=min_book_id group by ser_id) a
  order by s;
END //

DELIMITER ;
commit;
+0 −1
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@ import sopdsparse
import base64
import subprocess
import zipf
from urllib import request
from urllib import parse

#######################################################################
+0 −1
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@

import os
import sys
import datetime
import mysql.connector
from mysql.connector import errorcode