reduce max length of agendaposter_phrase to 50

master
Aevann 2023-03-21 16:15:35 +02:00
parent 8dc78b4f95
commit 6cb43bb32c
3 changed files with 4 additions and 5 deletions

View File

@ -311,8 +311,8 @@ def award_thing(v, thing_type, id):
agendaposter_phrase = agendaposter_phrase.strip() agendaposter_phrase = agendaposter_phrase.strip()
if not agendaposter_phrase: abort(400, "Missing phrase!") if not agendaposter_phrase: abort(400, "Missing phrase!")
if len(agendaposter_phrase) > 100: if len(agendaposter_phrase) > 50:
abort(400, "Max length for phrase is 100 characters") abort(400, "Max length for phrase is 50 characters")
author.agendaposter_phrase = agendaposter_phrase author.agendaposter_phrase = agendaposter_phrase

View File

@ -1,2 +1,2 @@
alter table users add column agendaposter_phrase varchar(100); alter table users add column agendaposter_phrase varchar(50);
update users set agendaposter_phrase='trans lives matter' where agendaposter>0; update users set agendaposter_phrase='trans lives matter' where agendaposter>0;

View File

@ -1056,7 +1056,7 @@ CREATE TABLE public.users (
event_darkmode boolean, event_darkmode boolean,
blacklisted_by integer, blacklisted_by integer,
hidevotedon boolean DEFAULT false NOT NULL, hidevotedon boolean DEFAULT false NOT NULL,
agendaposter_phrase character varying(100) agendaposter_phrase character varying(50)
); );
@ -2896,4 +2896,3 @@ ALTER TABLE ONLY public.comments
-- --
-- PostgreSQL database dump complete -- PostgreSQL database dump complete
-- --