Fix recurring scheduled post CI checks

Made-with: Cursor
This commit is contained in:
Nick Misasi
2026-04-30 11:52:25 -04:00
parent c54034b9c0
commit 7ac146217e
6 changed files with 9 additions and 6 deletions
@@ -341,3 +341,5 @@ channels/db/migrations/postgres/000171_drop_property_fields_protected_index.down
channels/db/migrations/postgres/000171_drop_property_fields_protected_index.up.sql
channels/db/migrations/postgres/000172_add_scheduled_post_recurrence.down.sql
channels/db/migrations/postgres/000172_add_scheduled_post_recurrence.up.sql
channels/db/migrations/postgres/000173_add_scheduled_post_pending_index.down.sql
channels/db/migrations/postgres/000173_add_scheduled_post_pending_index.up.sql
@@ -1,4 +1,3 @@
DROP INDEX IF EXISTS idx_scheduledposts_pending_scheduled_at_id;
ALTER TABLE scheduledposts DROP CONSTRAINT IF EXISTS chk_scheduledposts_repeat_timezone_required;
ALTER TABLE scheduledposts DROP COLUMN IF EXISTS repeattimezone;
ALTER TABLE scheduledposts DROP COLUMN IF EXISTS repeattype;
@@ -1,10 +1,6 @@
ALTER TABLE scheduledposts ADD COLUMN IF NOT EXISTS repeattype VARCHAR(64) NOT NULL DEFAULT '';
ALTER TABLE scheduledposts ADD COLUMN IF NOT EXISTS repeattimezone VARCHAR(128) NOT NULL DEFAULT '';
CREATE INDEX IF NOT EXISTS idx_scheduledposts_pending_scheduled_at_id
ON scheduledposts (scheduledat DESC, id)
WHERE errorcode = '';
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_constraint WHERE conname = 'chk_scheduledposts_repeat_timezone_required') THEN
@@ -0,0 +1,2 @@
-- morph:nontransactional
DROP INDEX CONCURRENTLY IF EXISTS idx_scheduledposts_pending_scheduled_at_id;
@@ -0,0 +1,4 @@
-- morph:nontransactional
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_scheduledposts_pending_scheduled_at_id
ON scheduledposts (scheduledat DESC, id)
WHERE errorcode = '';
+1 -1
View File
@@ -34,7 +34,7 @@ func TestRandomString(t *testing.T) {
}
func BenchmarkNewTestPassword(b *testing.B) {
for range b.N {
for b.Loop() {
NewTestPassword()
}
}