[backend/database] Fix database bootstrap
This commit is contained in:
parent
ea43728db3
commit
a859eef3c5
1 changed files with 5 additions and 5 deletions
|
@ -11,8 +11,8 @@ namespace Iceshrimp.Backend.Core.Database.Migrations
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.Sql("""
|
migrationBuilder.Sql("""
|
||||||
DROP FUNCTION public.note_ancestors;
|
DROP FUNCTION IF EXISTS public.note_ancestors;
|
||||||
CREATE OR REPLACE FUNCTION public.note_ancestors (start_id character varying, max_depth integer)
|
CREATE FUNCTION public.note_ancestors (start_id character varying, max_depth integer)
|
||||||
RETURNS SETOF "note"
|
RETURNS SETOF "note"
|
||||||
LANGUAGE sql
|
LANGUAGE sql
|
||||||
AS $function$
|
AS $function$
|
||||||
|
@ -45,7 +45,7 @@ namespace Iceshrimp.Backend.Core.Database.Migrations
|
||||||
""");
|
""");
|
||||||
|
|
||||||
migrationBuilder.Sql("""
|
migrationBuilder.Sql("""
|
||||||
DROP FUNCTION public.note_descendants;
|
DROP FUNCTION IF EXISTS public.note_descendants;
|
||||||
CREATE FUNCTION public.note_descendants (start_id character varying, max_depth integer, max_breadth integer)
|
CREATE FUNCTION public.note_descendants (start_id character varying, max_depth integer, max_breadth integer)
|
||||||
RETURNS SETOF "note"
|
RETURNS SETOF "note"
|
||||||
LANGUAGE sql
|
LANGUAGE sql
|
||||||
|
@ -100,7 +100,7 @@ namespace Iceshrimp.Backend.Core.Database.Migrations
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.Sql("""
|
migrationBuilder.Sql("""
|
||||||
DROP FUNCTION public.note_ancestors;
|
DROP FUNCTION IF EXISTS public.note_ancestors;
|
||||||
CREATE FUNCTION public.note_ancestors (start_id character varying, max_depth integer)
|
CREATE FUNCTION public.note_ancestors (start_id character varying, max_depth integer)
|
||||||
RETURNS TABLE (
|
RETURNS TABLE (
|
||||||
id character varying)
|
id character varying)
|
||||||
|
@ -138,7 +138,7 @@ namespace Iceshrimp.Backend.Core.Database.Migrations
|
||||||
""");
|
""");
|
||||||
|
|
||||||
migrationBuilder.Sql("""
|
migrationBuilder.Sql("""
|
||||||
DROP FUNCTION public.note_descendants;
|
DROP FUNCTION IF EXISTS public.note_descendants;
|
||||||
CREATE FUNCTION public.note_descendants (start_id character varying, max_depth integer, max_breadth integer)
|
CREATE FUNCTION public.note_descendants (start_id character varying, max_depth integer, max_breadth integer)
|
||||||
RETURNS TABLE (
|
RETURNS TABLE (
|
||||||
id character varying)
|
id character varying)
|
||||||
|
|
Loading…
Add table
Reference in a new issue