2 * DB migration from v00 to v01 (postgres)
5 ALTER TABLE tb_sessions_log ADD free_mb dm_money;
6 ALTER TABLE tb_sessions_log ADD reason TEXT;
8 DROP FUNCTION sp_add_session_log_entry ( dm_name, timestamp without time zone, dm_session_event_type, inet, dm_money);
10 CREATE FUNCTION sp_add_session_log_entry(_login dm_name,
11 _event_time TIMESTAMP,
12 _event_type dm_session_event_type,
21 _pk_session_log INTEGER;
23 SELECT pk_user INTO _pk_user
26 IF _pk_user IS NULL THEN
27 RAISE EXCEPTION 'User % not found', _login;
31 INSERT INTO tb_sessions_log
48 SELECT CURRVAL('tb_sessions_log_pk_session_log_seq') INTO _pk_session_log;
50 RETURN _pk_session_log;
54 UPDATE tb_info SET version = 6;