@opengis/fastify-table 2.6.2 → 2.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -86
- package/dist/functions.js +20 -20
- package/dist/module/core/cls/constraint_action.json +9 -9
- package/dist/module/core/cls/constraint_matchtype.json +5 -5
- package/dist/module/core/cls/constraint_type_full.json +17 -17
- package/dist/module/core/cls/core.user_type.json +13 -13
- package/dist/module/core/pt/schemaItem.pt.hbs +17 -17
- package/dist/module/core/select/core.user_mentioned.json +3 -0
- package/dist/module/core/select/core.user_mentioned.sql +1 -1
- package/dist/script/adduser +14 -14
- package/dist/script/dump.js +48 -48
- package/dist/script/dump.ts +216 -216
- package/dist/script/migrate.ts +23 -23
- package/dist/server/helpers/core/badge.js +1 -1
- package/dist/server/helpers/list/descriptionList.js +8 -8
- package/dist/server/helpers/list/tableList.js +4 -4
- package/dist/server/helpers/list/utils/button.js +1 -1
- package/dist/server/helpers/list/utils/buttonDel.js +3 -3
- package/dist/server/helpers/list/utils/buttonEdit.js +3 -3
- package/dist/server/helpers/utils/button.js +1 -1
- package/dist/server/helpers/utils/buttonAdd.js +15 -15
- package/dist/server/helpers/utils/buttonDel.js +11 -11
- package/dist/server/helpers/utils/buttonEdit.js +3 -3
- package/dist/server/migrations/0.sql +99 -99
- package/dist/server/migrations/1_users.sql +145 -145
- package/dist/server/migrations/cls.sql +105 -105
- package/dist/server/migrations/context.sql +136 -136
- package/dist/server/migrations/dictionaries.sql +78 -78
- package/dist/server/migrations/oauth.sql +79 -79
- package/dist/server/migrations/properties.sql +115 -115
- package/dist/server/migrations/roles.sql +201 -201
- package/dist/server/migrations/template.sql +43 -43
- package/dist/server/plugins/access/funcs/getUserPermissions.js +7 -7
- package/dist/server/plugins/auth/funcs/authorizeUser.js +4 -4
- package/dist/server/plugins/auth/funcs/getQuery.js +20 -20
- package/dist/server/plugins/auth/index.js +3 -3
- package/dist/server/plugins/crud/funcs/dataUpdate.js +7 -7
- package/dist/server/plugins/crud/funcs/getAccess.js +14 -14
- package/dist/server/plugins/crud/funcs/utils/getInsertQuery.js +6 -6
- package/dist/server/plugins/crud/funcs/utils/logChanges.js +18 -18
- package/dist/server/plugins/grpc/utils/convertp.proto +143 -143
- package/dist/server/plugins/grpc/utils/htmlTemplate.js +10 -10
- package/dist/server/plugins/grpc/utils/office2pdf.proto +13 -13
- package/dist/server/plugins/metric/loggerSystem.js +1 -1
- package/dist/server/plugins/pg/funcs/autoIndex.js +5 -5
- package/dist/server/plugins/pg/funcs/getMeta.js +15 -15
- package/dist/server/plugins/pg/funcs/init.js +36 -36
- package/dist/server/plugins/sqlite/funcs/init.js +22 -22
- package/dist/server/plugins/table/funcs/getData.js +13 -13
- package/dist/server/plugins/table/funcs/getFilterSQL/util/getCustomQuery.js +1 -1
- package/dist/server/plugins/table/funcs/getSelect.js +1 -1
- package/dist/server/plugins/table/funcs/gisIRColumn.js +3 -3
- package/dist/server/plugins/usercls/index.js +2 -2
- package/dist/server/routes/access/controllers/access.group.js +6 -6
- package/dist/server/routes/access/controllers/access.group.post.js +3 -3
- package/dist/server/routes/access/controllers/access.interface.js +14 -14
- package/dist/server/routes/access/controllers/access.user.js +6 -6
- package/dist/server/routes/auth/controllers/2factor/providers/totp.js +5 -5
- package/dist/server/routes/auth/controllers/2factor/qrcode.js +1 -1
- package/dist/server/routes/auth/controllers/2factor/recovery.js +1 -1
- package/dist/server/routes/auth/controllers/2factor/verify.js +1 -1
- package/dist/server/routes/auth/controllers/core/getUserInfo.js +33 -33
- package/dist/server/routes/auth/controllers/core/passwordRecovery.js +1 -1
- package/dist/server/routes/auth/controllers/core/registration.js +2 -2
- package/dist/server/routes/auth/controllers/page/login2faTemplate.js +1 -1
- package/dist/server/routes/crud/functions/deleteTableRelation.js +9 -9
- package/dist/server/routes/crud/functions/updateTableRelation.js +9 -9
- package/dist/server/routes/file/controllers/resizeAll.js +7 -7
- package/dist/server/routes/grpc/controllers/file2geojson.js +13 -13
- package/dist/server/routes/menu/controllers/getMenu.js +9 -9
- package/dist/server/routes/notifications/controllers/readNotifications.js +4 -4
- package/dist/server/routes/notifications/controllers/userNotifications.js +3 -3
- package/dist/server/routes/table/controllers/card.js +1 -1
- package/dist/server/routes/table/controllers/filter.js +6 -6
- package/dist/server/routes/table/controllers/form.js +1 -1
- package/dist/server/routes/table/controllers/getFormByTable.js +6 -6
- package/dist/server/routes/table/controllers/suggest.d.ts.map +1 -1
- package/dist/server/routes/table/controllers/suggest.js +33 -22
- package/dist/server/routes/table/controllers/tableData.js +2 -2
- package/dist/server/routes/table/controllers/tableInfo.js +10 -10
- package/dist/server/routes/table/functions/getData.js +13 -13
- package/dist/server/routes/table/schema.d.ts +5 -0
- package/dist/server/routes/table/schema.d.ts.map +1 -1
- package/dist/server/routes/table/schema.js +2 -1
- package/dist/server/routes/widget/controllers/widget.get.js +33 -33
- package/dist/server/routes/widget/controllers/widget.set.js +4 -4
- package/dist/server/routes/widget/services/widget.entity.get.js +33 -33
- package/dist/server/routes/widget/services/widget.entity.set.js +4 -4
- package/dist/server/templates/page/2factor-recovery.html +101 -101
- package/dist/server/templates/page/2factor.html +140 -140
- package/dist/server/templates/page/login.html +90 -90
- package/dist/server/templates/pt/recovery-codes-email-template.hbs +12 -12
- package/dist/server/templates/pt/recovery-password-email-template.html +20 -20
- package/package.json +99 -99
|
@@ -7,22 +7,22 @@ export default function button(token, title, icon, permission = '') {
|
|
|
7
7
|
const permissionAttr = handlePermission
|
|
8
8
|
? `v-permission="${handlePermission}"`
|
|
9
9
|
: '';
|
|
10
|
-
const apiCall = `window.v3plugin.$api({
|
|
11
|
-
api: '/api/table/${token}',
|
|
12
|
-
method: 'delete',
|
|
13
|
-
confirm: {
|
|
14
|
-
title: 'Підтвердити операцію',
|
|
15
|
-
text: 'Ви впевнені що хочете вилучити запис?',
|
|
16
|
-
cancel: 'Скасувати',
|
|
17
|
-
confirm: 'Виконати'
|
|
18
|
-
}
|
|
10
|
+
const apiCall = `window.v3plugin.$api({
|
|
11
|
+
api: '/api/table/${token}',
|
|
12
|
+
method: 'delete',
|
|
13
|
+
confirm: {
|
|
14
|
+
title: 'Підтвердити операцію',
|
|
15
|
+
text: 'Ви впевнені що хочете вилучити запис?',
|
|
16
|
+
cancel: 'Скасувати',
|
|
17
|
+
confirm: 'Виконати'
|
|
18
|
+
}
|
|
19
19
|
})`;
|
|
20
20
|
const buttonClass = icon
|
|
21
21
|
? `size-8 inline-flex justify-center items-center gap-x-2 rounded-e-lg border border-stone-200 bg-${COLOR}-100 text-stone-800 shadow-sm hover:bg-${COLOR}-200 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700`
|
|
22
22
|
: `px-2 py-1 inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border border-transparent hover:text-white ring-offset-white bg-${COLOR}-100 text-${COLOR}-500 hover:bg-${COLOR}-500 focus:ring-${COLOR}-500`;
|
|
23
23
|
const buttonContent = icon
|
|
24
|
-
? `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="${COLOR}" class="size-3.5">
|
|
25
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"/>
|
|
24
|
+
? `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="${COLOR}" class="size-3.5">
|
|
25
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"/>
|
|
26
26
|
</svg>`
|
|
27
27
|
: `${title || "Вилучити"}`;
|
|
28
28
|
return `<button ${permissionAttr} onclick="${apiCall}" class="${buttonClass}">${buttonContent}</button>`;
|
|
@@ -12,9 +12,9 @@ export default function button(token, title, icon, permission = '') {
|
|
|
12
12
|
? `size-8 inline-flex justify-center items-center gap-x-2 font-medium rounded-s-lg border border-stone-200 bg-${COLOR}-100 text-stone-800 shadow-sm hover:bg-${COLOR}-200 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-${COLOR}-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700 `
|
|
13
13
|
: `px-2 py-1 inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border border-transparent hover:text-white ring-offset-white bg-${COLOR}-100 text-${COLOR}-500 hover:bg-${COLOR}-500 focus:ring-${COLOR}-500`;
|
|
14
14
|
const buttonContent = icon
|
|
15
|
-
? `<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="${COLOR}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
16
|
-
<path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"></path>
|
|
17
|
-
<path d="m15 5 4 4"></path>
|
|
15
|
+
? `<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="${COLOR}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
16
|
+
<path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"></path>
|
|
17
|
+
<path d="m15 5 4 4"></path>
|
|
18
18
|
</svg>`
|
|
19
19
|
: `${title || "Редагувати"}`;
|
|
20
20
|
return `<button ${permissionAttr} onclick="${formCall}" class="${buttonClass}">${buttonContent}</button>`;
|
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
-- fix error if function exists and return type not text i.e bigint
|
|
2
|
-
|
|
3
|
-
do $$
|
|
4
|
-
|
|
5
|
-
declare
|
|
6
|
-
m record;
|
|
7
|
-
_pk text;
|
|
8
|
-
_tables json;
|
|
9
|
-
_returnType text;
|
|
10
|
-
|
|
11
|
-
begin
|
|
12
|
-
|
|
13
|
-
select format_type(p.prorettype, null) as return_type
|
|
14
|
-
from pg_proc p
|
|
15
|
-
where p.proname = 'next_id'
|
|
16
|
-
and p.pronamespace = 'public'::regnamespace into _returnType;
|
|
17
|
-
|
|
18
|
-
if (_returnType != 'text') then
|
|
19
|
-
raise notice 'default reassign start: % -> text', _returnType;
|
|
20
|
-
|
|
21
|
-
CREATE EXTENSION if not exists "uuid-ossp";
|
|
22
|
-
|
|
23
|
-
SELECT json_object_agg(a.attrelid::regclass, a.attname)
|
|
24
|
-
FROM pg_catalog.pg_attribute a
|
|
25
|
-
LEFT JOIN pg_catalog.pg_attrdef d ON (a.attrelid, a.attnum) = (d.adrelid, d.adnum)
|
|
26
|
-
WHERE NOT a.attisdropped -- no dropped (dead) columns
|
|
27
|
-
AND a.attnum > 0 -- no system columns
|
|
28
|
-
AND pg_get_expr(d.adbin, d.adrelid) = 'next_id()' into _tables;
|
|
29
|
-
|
|
30
|
-
FOR m in (select json_object_keys(_tables) as table) loop
|
|
31
|
-
_pk = _tables->>m.table;
|
|
32
|
-
raise notice 'drop default: %,%', m.table, _pk;
|
|
33
|
-
EXECUTE('alter table '|| m.table || ' alter column ' || _pk || ' set default null;');
|
|
34
|
-
end loop;
|
|
35
|
-
|
|
36
|
-
DROP FUNCTION IF EXISTS next_id();
|
|
37
|
-
|
|
38
|
-
/* CREATE EXTENSION if not exists "uuid-ossp";
|
|
39
|
-
ALTER EXTENSION "uuid-ossp" SET SCHEMA public; */
|
|
40
|
-
|
|
41
|
-
CREATE OR REPLACE FUNCTION next_id()
|
|
42
|
-
RETURNS text AS
|
|
43
|
-
$BODY$
|
|
44
|
-
DECLARE
|
|
45
|
-
|
|
46
|
-
BEGIN
|
|
47
|
-
-- return replace(public.uuid_generate_v4()::text, '-', '');
|
|
48
|
-
-- return replace(gen_random_uuid()::text, '-', ''); -- native from postgres 13 onward
|
|
49
|
-
return encode(public.gen_random_bytes(6), 'hex');
|
|
50
|
-
END;
|
|
51
|
-
$BODY$
|
|
52
|
-
LANGUAGE plpgsql VOLATILE
|
|
53
|
-
COST 100;
|
|
54
|
-
|
|
55
|
-
FOR m in (select json_object_keys(_tables) as table) loop
|
|
56
|
-
_pk = _tables->>m.table;
|
|
57
|
-
raise notice 'reassign default: %, %', m.table, _pk;
|
|
58
|
-
EXECUTE('alter table '|| m.table || ' alter column ' || _pk || ' set default next_id();');
|
|
59
|
-
end loop;
|
|
60
|
-
|
|
61
|
-
raise notice 'reassign default finish: %', _tables;
|
|
62
|
-
|
|
63
|
-
else
|
|
64
|
-
raise notice 'skip default reassign';
|
|
65
|
-
|
|
66
|
-
/* CREATE EXTENSION if not exists "uuid-ossp";
|
|
67
|
-
ALTER EXTENSION "uuid-ossp" SET SCHEMA public; */
|
|
68
|
-
|
|
69
|
-
CREATE OR REPLACE FUNCTION next_id()
|
|
70
|
-
RETURNS text AS
|
|
71
|
-
$BODY$
|
|
72
|
-
DECLARE
|
|
73
|
-
|
|
74
|
-
BEGIN
|
|
75
|
-
-- return replace(public.uuid_generate_v4()::text, '-', '');
|
|
76
|
-
-- return replace(gen_random_uuid()::text, '-', ''); -- native from postgres 13 onward
|
|
77
|
-
return encode(public.gen_random_bytes(6), 'hex');
|
|
78
|
-
END;
|
|
79
|
-
$BODY$
|
|
80
|
-
LANGUAGE plpgsql VOLATILE
|
|
81
|
-
COST 100;
|
|
82
|
-
end if;
|
|
83
|
-
|
|
84
|
-
end $$;
|
|
85
|
-
|
|
86
|
-
CREATE OR REPLACE FUNCTION array_intersect(
|
|
87
|
-
anyarray,
|
|
88
|
-
anyarray)
|
|
89
|
-
RETURNS anyarray
|
|
90
|
-
LANGUAGE 'sql'
|
|
91
|
-
COST 100
|
|
92
|
-
VOLATILE PARALLEL UNSAFE
|
|
93
|
-
AS $BODY$
|
|
94
|
-
|
|
95
|
-
SELECT ARRAY(
|
|
96
|
-
SELECT UNNEST($1)
|
|
97
|
-
INTERSECT
|
|
98
|
-
SELECT UNNEST($2)
|
|
99
|
-
);
|
|
1
|
+
-- fix error if function exists and return type not text i.e bigint
|
|
2
|
+
|
|
3
|
+
do $$
|
|
4
|
+
|
|
5
|
+
declare
|
|
6
|
+
m record;
|
|
7
|
+
_pk text;
|
|
8
|
+
_tables json;
|
|
9
|
+
_returnType text;
|
|
10
|
+
|
|
11
|
+
begin
|
|
12
|
+
|
|
13
|
+
select format_type(p.prorettype, null) as return_type
|
|
14
|
+
from pg_proc p
|
|
15
|
+
where p.proname = 'next_id'
|
|
16
|
+
and p.pronamespace = 'public'::regnamespace into _returnType;
|
|
17
|
+
|
|
18
|
+
if (_returnType != 'text') then
|
|
19
|
+
raise notice 'default reassign start: % -> text', _returnType;
|
|
20
|
+
|
|
21
|
+
CREATE EXTENSION if not exists "uuid-ossp";
|
|
22
|
+
|
|
23
|
+
SELECT json_object_agg(a.attrelid::regclass, a.attname)
|
|
24
|
+
FROM pg_catalog.pg_attribute a
|
|
25
|
+
LEFT JOIN pg_catalog.pg_attrdef d ON (a.attrelid, a.attnum) = (d.adrelid, d.adnum)
|
|
26
|
+
WHERE NOT a.attisdropped -- no dropped (dead) columns
|
|
27
|
+
AND a.attnum > 0 -- no system columns
|
|
28
|
+
AND pg_get_expr(d.adbin, d.adrelid) = 'next_id()' into _tables;
|
|
29
|
+
|
|
30
|
+
FOR m in (select json_object_keys(_tables) as table) loop
|
|
31
|
+
_pk = _tables->>m.table;
|
|
32
|
+
raise notice 'drop default: %,%', m.table, _pk;
|
|
33
|
+
EXECUTE('alter table '|| m.table || ' alter column ' || _pk || ' set default null;');
|
|
34
|
+
end loop;
|
|
35
|
+
|
|
36
|
+
DROP FUNCTION IF EXISTS next_id();
|
|
37
|
+
|
|
38
|
+
/* CREATE EXTENSION if not exists "uuid-ossp";
|
|
39
|
+
ALTER EXTENSION "uuid-ossp" SET SCHEMA public; */
|
|
40
|
+
|
|
41
|
+
CREATE OR REPLACE FUNCTION next_id()
|
|
42
|
+
RETURNS text AS
|
|
43
|
+
$BODY$
|
|
44
|
+
DECLARE
|
|
45
|
+
|
|
46
|
+
BEGIN
|
|
47
|
+
-- return replace(public.uuid_generate_v4()::text, '-', '');
|
|
48
|
+
-- return replace(gen_random_uuid()::text, '-', ''); -- native from postgres 13 onward
|
|
49
|
+
return encode(public.gen_random_bytes(6), 'hex');
|
|
50
|
+
END;
|
|
51
|
+
$BODY$
|
|
52
|
+
LANGUAGE plpgsql VOLATILE
|
|
53
|
+
COST 100;
|
|
54
|
+
|
|
55
|
+
FOR m in (select json_object_keys(_tables) as table) loop
|
|
56
|
+
_pk = _tables->>m.table;
|
|
57
|
+
raise notice 'reassign default: %, %', m.table, _pk;
|
|
58
|
+
EXECUTE('alter table '|| m.table || ' alter column ' || _pk || ' set default next_id();');
|
|
59
|
+
end loop;
|
|
60
|
+
|
|
61
|
+
raise notice 'reassign default finish: %', _tables;
|
|
62
|
+
|
|
63
|
+
else
|
|
64
|
+
raise notice 'skip default reassign';
|
|
65
|
+
|
|
66
|
+
/* CREATE EXTENSION if not exists "uuid-ossp";
|
|
67
|
+
ALTER EXTENSION "uuid-ossp" SET SCHEMA public; */
|
|
68
|
+
|
|
69
|
+
CREATE OR REPLACE FUNCTION next_id()
|
|
70
|
+
RETURNS text AS
|
|
71
|
+
$BODY$
|
|
72
|
+
DECLARE
|
|
73
|
+
|
|
74
|
+
BEGIN
|
|
75
|
+
-- return replace(public.uuid_generate_v4()::text, '-', '');
|
|
76
|
+
-- return replace(gen_random_uuid()::text, '-', ''); -- native from postgres 13 onward
|
|
77
|
+
return encode(public.gen_random_bytes(6), 'hex');
|
|
78
|
+
END;
|
|
79
|
+
$BODY$
|
|
80
|
+
LANGUAGE plpgsql VOLATILE
|
|
81
|
+
COST 100;
|
|
82
|
+
end if;
|
|
83
|
+
|
|
84
|
+
end $$;
|
|
85
|
+
|
|
86
|
+
CREATE OR REPLACE FUNCTION array_intersect(
|
|
87
|
+
anyarray,
|
|
88
|
+
anyarray)
|
|
89
|
+
RETURNS anyarray
|
|
90
|
+
LANGUAGE 'sql'
|
|
91
|
+
COST 100
|
|
92
|
+
VOLATILE PARALLEL UNSAFE
|
|
93
|
+
AS $BODY$
|
|
94
|
+
|
|
95
|
+
SELECT ARRAY(
|
|
96
|
+
SELECT UNNEST($1)
|
|
97
|
+
INTERSECT
|
|
98
|
+
SELECT UNNEST($2)
|
|
99
|
+
);
|
|
100
100
|
$BODY$;
|
|
@@ -1,146 +1,146 @@
|
|
|
1
|
-
-- file name changed to 1_users.sql for order reasons - drop of constraints in current file affects other migrations and should be done first to ensure expected db structure
|
|
2
|
-
|
|
3
|
-
create schema if not exists admin;
|
|
4
|
-
|
|
5
|
-
-- DROP TABLE is exists admin.users;
|
|
6
|
-
CREATE TABLE if not exists admin.users();
|
|
7
|
-
ALTER TABLE admin.users add column if not exists uid text NOT NULL DEFAULT next_id();
|
|
8
|
-
ALTER TABLE admin.users DROP CONSTRAINT if exists admin_user_uid_pkey cascade;
|
|
9
|
-
ALTER TABLE admin.users DROP CONSTRAINT if exists user_pk cascade;
|
|
10
|
-
ALTER TABLE admin.users DROP CONSTRAINT if exists admin_user_user_rnokpp;
|
|
11
|
-
ALTER TABLE admin.users DROP CONSTRAINT if exists admin_user_type_check;
|
|
12
|
-
|
|
13
|
-
ALTER TABLE admin.users add column if not exists login text;
|
|
14
|
-
ALTER TABLE admin.users add column if not exists password text NOT NULL DEFAULT ''::text;
|
|
15
|
-
ALTER TABLE admin.users add column if not exists user_name text;
|
|
16
|
-
ALTER TABLE admin.users add column if not exists sur_name text;
|
|
17
|
-
ALTER TABLE admin.users add column if not exists father_name text;
|
|
18
|
-
ALTER TABLE admin.users add column if not exists email text;
|
|
19
|
-
ALTER TABLE admin.users add column if not exists phone text;
|
|
20
|
-
ALTER TABLE admin.users add column if not exists avatar text;
|
|
21
|
-
ALTER TABLE admin.users add column if not exists enabled boolean;
|
|
22
|
-
ALTER TABLE admin.users add column if not exists user_personal_code text;
|
|
23
|
-
ALTER TABLE admin.users add column if not exists last_activity_date timestamp without time zone;
|
|
24
|
-
ALTER TABLE admin.users add column if not exists user_type text DEFAULT 'regular'::text;
|
|
25
|
-
ALTER TABLE admin.users add column if not exists user_rnokpp text;
|
|
26
|
-
ALTER TABLE admin.users alter column user_rnokpp drop not null;
|
|
27
|
-
ALTER TABLE admin.users add column if not exists social_auth_id text;
|
|
28
|
-
ALTER TABLE admin.users add column if not exists social_auth_type text;
|
|
29
|
-
ALTER TABLE admin.users add column if not exists salt text;
|
|
30
|
-
ALTER TABLE admin.users add column if not exists cdate timestamp without time zone DEFAULT date_trunc('seconds'::text, now());
|
|
31
|
-
ALTER TABLE admin.users add column if not exists editor_id text;
|
|
32
|
-
ALTER TABLE admin.users add column if not exists editor_date timestamp without time zone;
|
|
33
|
-
ALTER TABLE admin.users add column if not exists twofa boolean not null DEFAULT false;
|
|
34
|
-
alter table admin.users alter column twofa set default false;
|
|
35
|
-
|
|
36
|
-
ALTER TABLE admin.users add CONSTRAINT admin_user_uid_pkey PRIMARY KEY (uid);
|
|
37
|
-
ALTER TABLE admin.users add CONSTRAINT admin_user_user_rnokpp UNIQUE (user_rnokpp);
|
|
38
|
-
|
|
39
|
-
-- update admin.users set user_type='regular' where user_type not in ('viewer', 'regular','admin','superadmin');
|
|
40
|
-
-- ALTER TABLE admin.users add constraint admin_user_type_check CHECK (user_type=any(array['viewer', 'regular','admin','superadmin']));
|
|
41
|
-
-- insert into admin.users (uid,login,user_name,email,sur_name,password,user_type,enabled)values('viewer','viewer','viewer','viewer','viewer','viewer','viewer', false) on conflict (uid) do update set enabled=excluded.enabled, sur_name=excluded.sur_name;
|
|
42
|
-
-- update admin.users set enabled=true where uid='viewer';
|
|
43
|
-
|
|
44
|
-
COMMENT ON TABLE admin.users IS 'Користувачі';
|
|
45
|
-
|
|
46
|
-
COMMENT ON COLUMN admin.users.uid IS 'ID користувача';
|
|
47
|
-
COMMENT ON COLUMN admin.users.login IS 'Логін користувача';
|
|
48
|
-
COMMENT ON COLUMN admin.users.password IS 'Пароль користувача';
|
|
49
|
-
COMMENT ON COLUMN admin.users.user_name IS 'Ім''я користувача';
|
|
50
|
-
COMMENT ON COLUMN admin.users.sur_name IS 'Прізвище користувача';
|
|
51
|
-
COMMENT ON COLUMN admin.users.father_name IS 'По-батькові користувача';
|
|
52
|
-
COMMENT ON COLUMN admin.users.email IS 'Ел. пошта користувача';
|
|
53
|
-
COMMENT ON COLUMN admin.users.phone IS 'Номер телефону користувача';
|
|
54
|
-
COMMENT ON COLUMN admin.users.avatar IS 'Аватар';
|
|
55
|
-
COMMENT ON COLUMN admin.users.enabled IS 'On / Off';
|
|
56
|
-
COMMENT ON COLUMN admin.users.last_activity_date IS 'Дата останньої активності';
|
|
57
|
-
COMMENT ON COLUMN admin.users.user_type IS 'Тип користувача';
|
|
58
|
-
COMMENT ON COLUMN admin.users.salt IS 'Сіль';
|
|
59
|
-
COMMENT ON COLUMN admin.users.twofa IS 'Двофакторна авторизація';
|
|
60
|
-
|
|
61
|
-
CREATE EXTENSION if not exists pgcrypto SCHEMA public VERSION "1.3";
|
|
62
|
-
|
|
63
|
-
alter table admin.users add column if not exists password_new_hash_algorithm boolean;
|
|
64
|
-
update admin.users set password_new_hash_algorithm = false where password_new_hash_algorithm is null;
|
|
65
|
-
|
|
66
|
-
-- DROP FUNCTION admin.insert_update_user_before();
|
|
67
|
-
CREATE OR REPLACE FUNCTION admin.insert_update_user_before()
|
|
68
|
-
RETURNS trigger AS
|
|
69
|
-
|
|
70
|
-
$BODY$
|
|
71
|
-
DECLARE
|
|
72
|
-
|
|
73
|
-
iterations int;
|
|
74
|
-
hash character varying;
|
|
75
|
-
|
|
76
|
-
BEGIN
|
|
77
|
-
-- new passwords would use more secure hashing algorithm
|
|
78
|
-
IF TG_OP = 'INSERT' OR (TG_OP = 'UPDATE' AND NEW.password <> OLD.password) THEN
|
|
79
|
-
|
|
80
|
-
NEW.salt = public.gen_salt('bf', 12);
|
|
81
|
-
|
|
82
|
-
IF length(NEW.password) > 0 THEN
|
|
83
|
-
NEW.password = public.crypt(NEW.password, NEW.salt);
|
|
84
|
-
NEW.password_new_hash_algorithm = true;
|
|
85
|
-
END IF;
|
|
86
|
-
|
|
87
|
-
END IF;
|
|
88
|
-
|
|
89
|
-
RETURN new;
|
|
90
|
-
END
|
|
91
|
-
$BODY$
|
|
92
|
-
|
|
93
|
-
LANGUAGE plpgsql VOLATILE COST 100;
|
|
94
|
-
|
|
95
|
-
DROP TRIGGER if exists insert_update_user_before on admin.users;
|
|
96
|
-
CREATE TRIGGER insert_update_user_before BEFORE INSERT OR UPDATE ON admin.users FOR EACH ROW
|
|
97
|
-
EXECUTE PROCEDURE admin.insert_update_user_before();
|
|
98
|
-
|
|
99
|
-
-- DROP TABLE is exists admin.users_social_auth;
|
|
100
|
-
CREATE TABLE if not exists admin.users_social_auth();
|
|
101
|
-
ALTER TABLE admin.users_social_auth add column if not exists users_social_auth_id text NOT NULL DEFAULT next_id();
|
|
102
|
-
ALTER TABLE admin.users_social_auth alter column users_social_auth_id set DEFAULT next_id();
|
|
103
|
-
ALTER TABLE admin.users_social_auth DROP CONSTRAINT if exists users_social_auth_pk cascade;
|
|
104
|
-
ALTER TABLE admin.users_social_auth DROP CONSTRAINT if exists users_social_auth_users_fk cascade;
|
|
105
|
-
ALTER TABLE admin.users_social_auth DROP CONSTRAINT if exists users_social_auth_social_id_email_unique;
|
|
106
|
-
|
|
107
|
-
ALTER TABLE admin.users_social_auth add column if not exists uid text not null;
|
|
108
|
-
ALTER TABLE admin.users_social_auth add column if not exists user_name text;
|
|
109
|
-
ALTER TABLE admin.users_social_auth add column if not exists sur_name text;
|
|
110
|
-
ALTER TABLE admin.users_social_auth add column if not exists email text;
|
|
111
|
-
ALTER TABLE admin.users_social_auth add column if not exists city text;
|
|
112
|
-
ALTER TABLE admin.users_social_auth add column if not exists phone text;
|
|
113
|
-
ALTER TABLE admin.users_social_auth add column if not exists social_auth_id text;
|
|
114
|
-
ALTER TABLE admin.users_social_auth add column if not exists social_auth_type text;
|
|
115
|
-
ALTER TABLE admin.users_social_auth add column if not exists social_auth_code text;
|
|
116
|
-
ALTER TABLE admin.users_social_auth add column if not exists social_auth_obj json;
|
|
117
|
-
ALTER TABLE admin.users_social_auth add column if not exists social_auth_date timestamp without time zone;
|
|
118
|
-
ALTER TABLE admin.users_social_auth add column if not exists social_auth_softpro_code text;
|
|
119
|
-
ALTER TABLE admin.users_social_auth add column if not exists enabled boolean;
|
|
120
|
-
ALTER TABLE admin.users_social_auth add column if not exists cdate timestamp without time zone;
|
|
121
|
-
ALTER TABLE admin.users_social_auth alter column cdate SET DEFAULT date_trunc('seconds'::text, now());
|
|
122
|
-
|
|
123
|
-
ALTER TABLE admin.users_social_auth add column if not exists editor_id text;
|
|
124
|
-
ALTER TABLE admin.users_social_auth add column if not exists lang text;
|
|
125
|
-
ALTER TABLE admin.users_social_auth add column if not exists editor_date timestamp without time zone;
|
|
126
|
-
ALTER TABLE admin.users_social_auth add column if not exists social_auth_url text;
|
|
127
|
-
ALTER TABLE admin.users_social_auth add CONSTRAINT users_social_auth_pk PRIMARY KEY (users_social_auth_id);
|
|
128
|
-
ALTER TABLE admin.users_social_auth add CONSTRAINT users_social_auth_users_fk FOREIGN KEY (uid) REFERENCES admin.users (uid) MATCH SIMPLE on delete cascade;
|
|
129
|
-
ALTER TABLE admin.users_social_auth add CONSTRAINT users_social_auth_social_id_email_unique UNIQUE (social_auth_id,email);
|
|
130
|
-
|
|
131
|
-
COMMENT ON COLUMN admin.users_social_auth.uid IS 'id пользователя';
|
|
132
|
-
COMMENT ON COLUMN admin.users_social_auth.user_name IS 'Имя пользователя';
|
|
133
|
-
COMMENT ON COLUMN admin.users_social_auth.sur_name IS 'Фамилия';
|
|
134
|
-
COMMENT ON COLUMN admin.users_social_auth.email IS 'email пользователя';
|
|
135
|
-
COMMENT ON COLUMN admin.users_social_auth.city IS 'Місто';
|
|
136
|
-
COMMENT ON COLUMN admin.users_social_auth.phone IS 'Телефон';
|
|
137
|
-
COMMENT ON COLUMN admin.users_social_auth.social_auth_id IS 'ID в соцсети';
|
|
138
|
-
COMMENT ON COLUMN admin.users_social_auth.social_auth_type IS 'тип соцсети';
|
|
139
|
-
COMMENT ON COLUMN admin.users_social_auth.social_auth_code IS 'код обьекта соцсети, используеться соцсетью';
|
|
140
|
-
COMMENT ON COLUMN admin.users_social_auth.social_auth_obj IS 'обьект соцсети';
|
|
141
|
-
COMMENT ON COLUMN admin.users_social_auth.social_auth_date IS 'время получение последнего обьекта соцсети';
|
|
142
|
-
COMMENT ON COLUMN admin.users_social_auth.social_auth_softpro_code IS 'код обьекта соцсети, создаваемый и используемый сервером авторизации';
|
|
143
|
-
COMMENT ON COLUMN admin.users_social_auth.enabled IS 'Выключатель';
|
|
144
|
-
COMMENT ON COLUMN admin.users_social_auth.social_auth_url IS 'URL для QR code';
|
|
145
|
-
|
|
1
|
+
-- file name changed to 1_users.sql for order reasons - drop of constraints in current file affects other migrations and should be done first to ensure expected db structure
|
|
2
|
+
|
|
3
|
+
create schema if not exists admin;
|
|
4
|
+
|
|
5
|
+
-- DROP TABLE is exists admin.users;
|
|
6
|
+
CREATE TABLE if not exists admin.users();
|
|
7
|
+
ALTER TABLE admin.users add column if not exists uid text NOT NULL DEFAULT next_id();
|
|
8
|
+
ALTER TABLE admin.users DROP CONSTRAINT if exists admin_user_uid_pkey cascade;
|
|
9
|
+
ALTER TABLE admin.users DROP CONSTRAINT if exists user_pk cascade;
|
|
10
|
+
ALTER TABLE admin.users DROP CONSTRAINT if exists admin_user_user_rnokpp;
|
|
11
|
+
ALTER TABLE admin.users DROP CONSTRAINT if exists admin_user_type_check;
|
|
12
|
+
|
|
13
|
+
ALTER TABLE admin.users add column if not exists login text;
|
|
14
|
+
ALTER TABLE admin.users add column if not exists password text NOT NULL DEFAULT ''::text;
|
|
15
|
+
ALTER TABLE admin.users add column if not exists user_name text;
|
|
16
|
+
ALTER TABLE admin.users add column if not exists sur_name text;
|
|
17
|
+
ALTER TABLE admin.users add column if not exists father_name text;
|
|
18
|
+
ALTER TABLE admin.users add column if not exists email text;
|
|
19
|
+
ALTER TABLE admin.users add column if not exists phone text;
|
|
20
|
+
ALTER TABLE admin.users add column if not exists avatar text;
|
|
21
|
+
ALTER TABLE admin.users add column if not exists enabled boolean;
|
|
22
|
+
ALTER TABLE admin.users add column if not exists user_personal_code text;
|
|
23
|
+
ALTER TABLE admin.users add column if not exists last_activity_date timestamp without time zone;
|
|
24
|
+
ALTER TABLE admin.users add column if not exists user_type text DEFAULT 'regular'::text;
|
|
25
|
+
ALTER TABLE admin.users add column if not exists user_rnokpp text;
|
|
26
|
+
ALTER TABLE admin.users alter column user_rnokpp drop not null;
|
|
27
|
+
ALTER TABLE admin.users add column if not exists social_auth_id text;
|
|
28
|
+
ALTER TABLE admin.users add column if not exists social_auth_type text;
|
|
29
|
+
ALTER TABLE admin.users add column if not exists salt text;
|
|
30
|
+
ALTER TABLE admin.users add column if not exists cdate timestamp without time zone DEFAULT date_trunc('seconds'::text, now());
|
|
31
|
+
ALTER TABLE admin.users add column if not exists editor_id text;
|
|
32
|
+
ALTER TABLE admin.users add column if not exists editor_date timestamp without time zone;
|
|
33
|
+
ALTER TABLE admin.users add column if not exists twofa boolean not null DEFAULT false;
|
|
34
|
+
alter table admin.users alter column twofa set default false;
|
|
35
|
+
|
|
36
|
+
ALTER TABLE admin.users add CONSTRAINT admin_user_uid_pkey PRIMARY KEY (uid);
|
|
37
|
+
ALTER TABLE admin.users add CONSTRAINT admin_user_user_rnokpp UNIQUE (user_rnokpp);
|
|
38
|
+
|
|
39
|
+
-- update admin.users set user_type='regular' where user_type not in ('viewer', 'regular','admin','superadmin');
|
|
40
|
+
-- ALTER TABLE admin.users add constraint admin_user_type_check CHECK (user_type=any(array['viewer', 'regular','admin','superadmin']));
|
|
41
|
+
-- insert into admin.users (uid,login,user_name,email,sur_name,password,user_type,enabled)values('viewer','viewer','viewer','viewer','viewer','viewer','viewer', false) on conflict (uid) do update set enabled=excluded.enabled, sur_name=excluded.sur_name;
|
|
42
|
+
-- update admin.users set enabled=true where uid='viewer';
|
|
43
|
+
|
|
44
|
+
COMMENT ON TABLE admin.users IS 'Користувачі';
|
|
45
|
+
|
|
46
|
+
COMMENT ON COLUMN admin.users.uid IS 'ID користувача';
|
|
47
|
+
COMMENT ON COLUMN admin.users.login IS 'Логін користувача';
|
|
48
|
+
COMMENT ON COLUMN admin.users.password IS 'Пароль користувача';
|
|
49
|
+
COMMENT ON COLUMN admin.users.user_name IS 'Ім''я користувача';
|
|
50
|
+
COMMENT ON COLUMN admin.users.sur_name IS 'Прізвище користувача';
|
|
51
|
+
COMMENT ON COLUMN admin.users.father_name IS 'По-батькові користувача';
|
|
52
|
+
COMMENT ON COLUMN admin.users.email IS 'Ел. пошта користувача';
|
|
53
|
+
COMMENT ON COLUMN admin.users.phone IS 'Номер телефону користувача';
|
|
54
|
+
COMMENT ON COLUMN admin.users.avatar IS 'Аватар';
|
|
55
|
+
COMMENT ON COLUMN admin.users.enabled IS 'On / Off';
|
|
56
|
+
COMMENT ON COLUMN admin.users.last_activity_date IS 'Дата останньої активності';
|
|
57
|
+
COMMENT ON COLUMN admin.users.user_type IS 'Тип користувача';
|
|
58
|
+
COMMENT ON COLUMN admin.users.salt IS 'Сіль';
|
|
59
|
+
COMMENT ON COLUMN admin.users.twofa IS 'Двофакторна авторизація';
|
|
60
|
+
|
|
61
|
+
CREATE EXTENSION if not exists pgcrypto SCHEMA public VERSION "1.3";
|
|
62
|
+
|
|
63
|
+
alter table admin.users add column if not exists password_new_hash_algorithm boolean;
|
|
64
|
+
update admin.users set password_new_hash_algorithm = false where password_new_hash_algorithm is null;
|
|
65
|
+
|
|
66
|
+
-- DROP FUNCTION admin.insert_update_user_before();
|
|
67
|
+
CREATE OR REPLACE FUNCTION admin.insert_update_user_before()
|
|
68
|
+
RETURNS trigger AS
|
|
69
|
+
|
|
70
|
+
$BODY$
|
|
71
|
+
DECLARE
|
|
72
|
+
|
|
73
|
+
iterations int;
|
|
74
|
+
hash character varying;
|
|
75
|
+
|
|
76
|
+
BEGIN
|
|
77
|
+
-- new passwords would use more secure hashing algorithm
|
|
78
|
+
IF TG_OP = 'INSERT' OR (TG_OP = 'UPDATE' AND NEW.password <> OLD.password) THEN
|
|
79
|
+
|
|
80
|
+
NEW.salt = public.gen_salt('bf', 12);
|
|
81
|
+
|
|
82
|
+
IF length(NEW.password) > 0 THEN
|
|
83
|
+
NEW.password = public.crypt(NEW.password, NEW.salt);
|
|
84
|
+
NEW.password_new_hash_algorithm = true;
|
|
85
|
+
END IF;
|
|
86
|
+
|
|
87
|
+
END IF;
|
|
88
|
+
|
|
89
|
+
RETURN new;
|
|
90
|
+
END
|
|
91
|
+
$BODY$
|
|
92
|
+
|
|
93
|
+
LANGUAGE plpgsql VOLATILE COST 100;
|
|
94
|
+
|
|
95
|
+
DROP TRIGGER if exists insert_update_user_before on admin.users;
|
|
96
|
+
CREATE TRIGGER insert_update_user_before BEFORE INSERT OR UPDATE ON admin.users FOR EACH ROW
|
|
97
|
+
EXECUTE PROCEDURE admin.insert_update_user_before();
|
|
98
|
+
|
|
99
|
+
-- DROP TABLE is exists admin.users_social_auth;
|
|
100
|
+
CREATE TABLE if not exists admin.users_social_auth();
|
|
101
|
+
ALTER TABLE admin.users_social_auth add column if not exists users_social_auth_id text NOT NULL DEFAULT next_id();
|
|
102
|
+
ALTER TABLE admin.users_social_auth alter column users_social_auth_id set DEFAULT next_id();
|
|
103
|
+
ALTER TABLE admin.users_social_auth DROP CONSTRAINT if exists users_social_auth_pk cascade;
|
|
104
|
+
ALTER TABLE admin.users_social_auth DROP CONSTRAINT if exists users_social_auth_users_fk cascade;
|
|
105
|
+
ALTER TABLE admin.users_social_auth DROP CONSTRAINT if exists users_social_auth_social_id_email_unique;
|
|
106
|
+
|
|
107
|
+
ALTER TABLE admin.users_social_auth add column if not exists uid text not null;
|
|
108
|
+
ALTER TABLE admin.users_social_auth add column if not exists user_name text;
|
|
109
|
+
ALTER TABLE admin.users_social_auth add column if not exists sur_name text;
|
|
110
|
+
ALTER TABLE admin.users_social_auth add column if not exists email text;
|
|
111
|
+
ALTER TABLE admin.users_social_auth add column if not exists city text;
|
|
112
|
+
ALTER TABLE admin.users_social_auth add column if not exists phone text;
|
|
113
|
+
ALTER TABLE admin.users_social_auth add column if not exists social_auth_id text;
|
|
114
|
+
ALTER TABLE admin.users_social_auth add column if not exists social_auth_type text;
|
|
115
|
+
ALTER TABLE admin.users_social_auth add column if not exists social_auth_code text;
|
|
116
|
+
ALTER TABLE admin.users_social_auth add column if not exists social_auth_obj json;
|
|
117
|
+
ALTER TABLE admin.users_social_auth add column if not exists social_auth_date timestamp without time zone;
|
|
118
|
+
ALTER TABLE admin.users_social_auth add column if not exists social_auth_softpro_code text;
|
|
119
|
+
ALTER TABLE admin.users_social_auth add column if not exists enabled boolean;
|
|
120
|
+
ALTER TABLE admin.users_social_auth add column if not exists cdate timestamp without time zone;
|
|
121
|
+
ALTER TABLE admin.users_social_auth alter column cdate SET DEFAULT date_trunc('seconds'::text, now());
|
|
122
|
+
|
|
123
|
+
ALTER TABLE admin.users_social_auth add column if not exists editor_id text;
|
|
124
|
+
ALTER TABLE admin.users_social_auth add column if not exists lang text;
|
|
125
|
+
ALTER TABLE admin.users_social_auth add column if not exists editor_date timestamp without time zone;
|
|
126
|
+
ALTER TABLE admin.users_social_auth add column if not exists social_auth_url text;
|
|
127
|
+
ALTER TABLE admin.users_social_auth add CONSTRAINT users_social_auth_pk PRIMARY KEY (users_social_auth_id);
|
|
128
|
+
ALTER TABLE admin.users_social_auth add CONSTRAINT users_social_auth_users_fk FOREIGN KEY (uid) REFERENCES admin.users (uid) MATCH SIMPLE on delete cascade;
|
|
129
|
+
ALTER TABLE admin.users_social_auth add CONSTRAINT users_social_auth_social_id_email_unique UNIQUE (social_auth_id,email);
|
|
130
|
+
|
|
131
|
+
COMMENT ON COLUMN admin.users_social_auth.uid IS 'id пользователя';
|
|
132
|
+
COMMENT ON COLUMN admin.users_social_auth.user_name IS 'Имя пользователя';
|
|
133
|
+
COMMENT ON COLUMN admin.users_social_auth.sur_name IS 'Фамилия';
|
|
134
|
+
COMMENT ON COLUMN admin.users_social_auth.email IS 'email пользователя';
|
|
135
|
+
COMMENT ON COLUMN admin.users_social_auth.city IS 'Місто';
|
|
136
|
+
COMMENT ON COLUMN admin.users_social_auth.phone IS 'Телефон';
|
|
137
|
+
COMMENT ON COLUMN admin.users_social_auth.social_auth_id IS 'ID в соцсети';
|
|
138
|
+
COMMENT ON COLUMN admin.users_social_auth.social_auth_type IS 'тип соцсети';
|
|
139
|
+
COMMENT ON COLUMN admin.users_social_auth.social_auth_code IS 'код обьекта соцсети, используеться соцсетью';
|
|
140
|
+
COMMENT ON COLUMN admin.users_social_auth.social_auth_obj IS 'обьект соцсети';
|
|
141
|
+
COMMENT ON COLUMN admin.users_social_auth.social_auth_date IS 'время получение последнего обьекта соцсети';
|
|
142
|
+
COMMENT ON COLUMN admin.users_social_auth.social_auth_softpro_code IS 'код обьекта соцсети, создаваемый и используемый сервером авторизации';
|
|
143
|
+
COMMENT ON COLUMN admin.users_social_auth.enabled IS 'Выключатель';
|
|
144
|
+
COMMENT ON COLUMN admin.users_social_auth.social_auth_url IS 'URL для QR code';
|
|
145
|
+
|
|
146
146
|
update admin.users set twofa=false where uid='1';
|