from migrations.fixtures.functions.base_function import BaseFunction class DspIdFunction(BaseFunction): @staticmethod def create_or_replace(): return """ CREATE OR REPLACE FUNCTION dsp_id(text, character varying) RETURNS text LANGUAGE sql AS $function$ SELECT UPPER($1) || '_' || $2; $function$; """ @staticmethod def drop(): return """ DROP FUNCTION IF EXISTS dsp_id(text, character varying); """