Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mfjJy-0007CN-2p for pgsql-www@arkaria.postgresql.org; Wed, 27 Oct 2021 13:50:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mfjJw-0002uI-7v for pgsql-www@arkaria.postgresql.org; Wed, 27 Oct 2021 13:50:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mfjJw-0002u9-1b for pgsql-www@lists.postgresql.org; Wed, 27 Oct 2021 13:50:24 +0000 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mfjJs-0003P5-V8 for pgsql-www@lists.postgresql.org; Wed, 27 Oct 2021 13:50:23 +0000 Received: by mail-lf1-x133.google.com with SMTP id u21so6296944lff.8 for ; Wed, 27 Oct 2021 06:50:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hagander-net.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dofYoPlWTrtvRdY7btExDqJboJNIjJpfTl6GafUkeec=; b=VCS1O/gG/neQA2KHU07MKeKTZDhTETTsDDTdwPt/G/hR8D0RvzVT7AlLnLreMTB6Ke PCYhH1tVXfOIZ65U0imO6kBIALA7Drvi5fCdQ2o/Q1k9bRGiaUJPhqANTuIv+gHi2bA6 orbAjL3ZAI3ob/LYMVZEONA5gZZSP13Q4JPu37dL3e+bBBX5VBN/bsJYT+yABWA1Z7n3 AL7wcchrGEsCXYmW86YfE5ekPh9bryHzbRGa+h8Kq8/sKKLcqxxyj2Vlo68cSIVEYqGV 0d9jMDnu2xd8w0B/23NL7HtYKr1EQrSQkQ+P6vJ6sq4g2lpWkk09g45wVNL2AJje7d8M oHEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dofYoPlWTrtvRdY7btExDqJboJNIjJpfTl6GafUkeec=; b=zoDEpJrDdcSvUvVJmGp0RW6KzFTH4sJc78BGKHYNA7cHmPoLFEz/y1Zc2elhKcunbX CcpGjTw1COOKnMeX357Ckzsq7B1RgglnSYHTxyHX8otluy8pMtl/hhUWKRjdcGJyk1Ht 6LNvHTdQCxGvwitvzEe5bV7/242sSSoHY0fk+wcvG0oFnQUn9CpZaW/Qyek0wbiBfxt3 euT2hKIh+q40Ent6I1LmgZvZqpVPWaLef+AgCsOFWRh3q2rL4m3Z8ASco5FNJ1LXKP3Q SOnpozCASLuuFC1/LLmr73bFSDei/YPG+yxJ7L2ZYlEVF6hg1V/I8AVUzffuGr2S7xO9 NaqA== X-Gm-Message-State: AOAM530nalgFaRYWczl9jT7KAnur/kIlt18zj9hylwoN9KOkU5qWnPkc mJcGSqrkaKEuLJGpiSWOlfbFDA8BVrgKcHV3kI0kXe3an2M= X-Google-Smtp-Source: ABdhPJxH6lDVhFgmZWF6gm5DVlzB26vLV8pBGublEMWHoQZtwVIVMjWF2MJX+MCnLZNoc2GoDoL/suhhILKhwj6/0AM= X-Received: by 2002:a19:520a:: with SMTP id m10mr28348694lfb.399.1635342620106; Wed, 27 Oct 2021 06:50:20 -0700 (PDT) MIME-Version: 1.0 References: <4280598e-cbe7-c5d3-fbce-fefce11da5f3@cmatte.me> <723b45bd-0c14-83eb-1911-b4f481e1b74c@cmatte.me> In-Reply-To: From: Magnus Hagander Date: Wed, 27 Oct 2021 15:50:08 +0200 Message-ID: Subject: Re: [PATCH] pgarchives: Bugfix: allow message's parentid to be null To: =?UTF-8?Q?C=C3=A9lestin_Matte?= Cc: PostgreSQL WWW Content-Type: multipart/alternative; boundary="000000000000f5374b05cf55df68" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000f5374b05cf55df68 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Oct 27, 2021 at 12:04 PM C=C3=A9lestin Matte wrote: > > > > That said, I think the correct solutoin is still, as I mentioned in one > of the other threads, to completely move everything into the initial > migration, instead of doing a piecemeal hack that's going to result in a > lot of small migrations for no real reason. We should just accept that t= he > existing one is broken and replace it. > > Can everything be moved to django's model though? The schema.sql file > defines several other components (indexes, text search configurations, te= xt > search dictionaries, functions, triggers) and I'm not sure django is able > to handle all of that by itself. Is it? Or do you only want to move table= s? > The models can't handle them, but migrations can. I'm thinking similar to pglister, where we use django models to create the parts that *can* be created, and then RunSQL() migrations to do the rest. That way the pure SQL parts can still run as part of the same flow, and can be mixed in with the django generated ones. The end result in the database should be the same, but avoiding to have to maintain a separate .sql file for it to keep in sync. I suggest moving everything, for that reason -- to ensure the order of application. --=20 Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/ --000000000000f5374b05cf55df68 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Oct 27, 2021 at 12:04 PM C=C3=A9l= estin Matte <celestin.matte@= cmatte.me> wrote:
>
> That said, I think the correct solutoin is still, as I mentioned in on= e of the other threads, to completely move everything into the initial migr= ation, instead of doing a piecemeal=C2=A0hack that's going to result in= a lot of small migrations for no real reason. We should=C2=A0 just accept = that the existing one is broken and replace it.

Can everything be moved to django's model though? The schema.sql file d= efines several other components (indexes, text search configurations, text = search dictionaries, functions, triggers) and I'm not sure django is ab= le to handle all of that by itself. Is it? Or do you only want to move tabl= es?

The models can't handle them, b= ut migrations can.

I'm thinking similar to pgl= ister, where we use django models to create the parts that *can* be created= , and then RunSQL() migrations to do the rest. That way the pure SQL parts = can still run as part of the same flow, and can be mixed in with the django= generated ones. The end result in the database should be the same, but avo= iding to have to maintain a separate .sql file for it to keep in sync.=C2= =A0

I suggest moving everything, for that reason = -- to ensure the order of application.

-- <= br>
=C2=A0M= agnus Hagander
=C2=A0Me: https://www.hagander.net/
=C2=A0Work: https://www.redpill-linpro.com/<= /div>
--000000000000f5374b05cf55df68--