def METHOD_NAME():
    database_operations = [
        migrations.AlterField(
            model_name="auditlogentry",
            name="organization",
            field=sentry.db.models.fields.foreignkey.FlexibleForeignKey(
                to="sentry.Organization", db_constraint=False, db_index=True, null=False
            ),
        ),
    ]
    state_operations = [
        migrations.AlterField(
            model_name="auditlogentry",
            name="organization",
            field=sentry.db.models.fields.hybrid_cloud_foreign_key.HybridCloudForeignKey(
                "sentry.Organization", db_index=True, on_delete="CASCADE"
            ),
        ),
        migrations.RemoveIndex(
            model_name="auditlogentry",
            name="sentry_audi_organiz_588b1e_idx",
        ),
        migrations.RemoveIndex(
            model_name="auditlogentry",
            name="sentry_audi_organiz_c8bd18_idx",
        ),
        migrations.RenameField(
            model_name="auditlogentry",
            old_name="organization",
            new_name="organization_id",
        ),
        migrations.AddIndex(
            model_name="auditlogentry",
            index=models.Index(
                fields=["organization_id", "datetime"], name="sentry_audi_organiz_c8bd18_idx"
            ),
        ),
        migrations.AddIndex(
            model_name="auditlogentry",
            index=models.Index(
                fields=["organization_id", "event", "datetime"],
                name="sentry_audi_organiz_588b1e_idx",
            ),
        ),
    ]
    return database_operations + [
        migrations.SeparateDatabaseAndState(state_operations=state_operations)
    ]