mirror of
https://github.com/mattermost/mattermost.git
synced 2026-05-12 20:00:48 +00:00
Fix recurring scheduled post CI checks
Made-with: Cursor
This commit is contained in:
@@ -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
|
||||
|
||||
+2
@@ -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 = '';
|
||||
@@ -34,7 +34,7 @@ func TestRandomString(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkNewTestPassword(b *testing.B) {
|
||||
for range b.N {
|
||||
for b.Loop() {
|
||||
NewTestPassword()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user