# Vbulletin 일괄 가져오기: "topics" 관계의 "pinned\_globally" 열에 null 값이 있어 not-null 제약 조건을 위반했습니다

**URL:** <https://meta.discourse.org/t/vbulletin-bulk-importer-null-value-in-column-pinned-globally-of-relation-topics-violates-not-null-constraint/366162>\
**Category:** Development\
**Created:** [5월 14, 2025, 8:48오후 UTC](https://meta.discourse.org/t/vbulletin-bulk-importer-null-value-in-column-pinned-globally-of-relation-topics-violates-not-null-constraint/366162 "2025-05-14T20:48:09Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [5월 15, 2025, 6:59오후 UTC](https://meta.discourse.org/t/vbulletin-bulk-importer-null-value-in-column-pinned-globally-of-relation-topics-violates-not-null-constraint/366162/7 "2025-05-15T18:59:23Z")

</div>

> [@RGJ](#):
>
> `closed`나 `has_summary` 같은 다른 유사한 `not null, default false` 컬럼에는 이 기능이 없는데 이상하네요.

몇 시간 더 걸렸지만, 그 이유는 다음과 같습니다. `process_topic` 함수가 모든 기본값을 처리하고 있기 때문입니다.

> <https://github.com/discourse/discourse/blob/main/script/bulk_import/base.rb#L1480-L1496>

아래와 같은 코드가 있어야 할 것 같습니다.

```plaintext
topic[:pinned_globally] ||= false

```

아니면

```plaintext
topic[:pinned_globally] ||= topic[:pinned_at].nil?

```

---

_[View the full topic](https://meta.discourse.org/t/vbulletin-bulk-importer-null-value-in-column-pinned-globally-of-relation-topics-violates-not-null-constraint/366162)._
