mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Change HID function types to char(5) as in DB
This commit is contained in:
parent
920c8cff01
commit
d246c9bf33
1 changed files with 5 additions and 5 deletions
|
|
@ -84,13 +84,13 @@ as $$
|
|||
$$ language sql stable rows 10;
|
||||
|
||||
|
||||
create function generate_hid() returns text as $$
|
||||
create function generate_hid() returns char(5) as $$
|
||||
select string_agg(substr('abcdefghijklmnopqrstuvwxyz', ceil(random() * 26)::integer, 1), '') from generate_series(1, 5)
|
||||
$$ language sql volatile;
|
||||
|
||||
|
||||
create function find_free_system_hid() returns text as $$
|
||||
declare new_hid text;
|
||||
create function find_free_system_hid() returns char(5) as $$
|
||||
declare new_hid char(5);
|
||||
begin
|
||||
loop
|
||||
new_hid := generate_hid();
|
||||
|
|
@ -100,8 +100,8 @@ end
|
|||
$$ language plpgsql volatile;
|
||||
|
||||
|
||||
create function find_free_member_hid() returns text as $$
|
||||
declare new_hid text;
|
||||
create function find_free_member_hid() returns char(5) as $$
|
||||
declare new_hid char(5);
|
||||
begin
|
||||
loop
|
||||
new_hid := generate_hid();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue