Skip to content

Separate local/remote instance at DB level - #44

Open
2chanhaeng wants to merge 6 commits into
fedify-dev:mainfrom
2chanhaeng:main
Open

Separate local/remote instance at DB level#44
2chanhaeng wants to merge 6 commits into
fedify-dev:mainfrom
2chanhaeng:main

Conversation

@2chanhaeng

Copy link
Copy Markdown
Member

Resolves #43.

A location column was added to the existing Instance table to define either a Local or Remote value, and additional tables were created to store the information required for defining local/remote instances. The IDs of the local/remote instance records reference the instance ID and are set to cascade upon removal to maintain DB consistency.

However, as the expires column was separated into the local instance table, the instances_expires_check check became impossible at the DB level. Therefore, this inevitably has to rely on the server.

While the input for the existing Instance creation API remains unchanged, the results for both retrieval and creation have been updated. To keep the interface of instance lookup results the same whether they are local or remote, the domain host is returned. For this purpose, the -r, --root-domain argument is received upon server execution to be used as the root domain. The default value is drfed.org.

Assisted-by: Codex:gpt-5-6-sol

Prompt:
DB 스키마에서 `instance` 를 Local/Remote 로 분리하고 API 를 수정하면서 기존 스키마/API 에 맞춰놨던 일부 테스트가 문제 되고 있습니다. [instance.test.ts](packages/graphql/src/instance.test.ts) 파일의 20419ce 커밋 변경 사항을 참고해서 문제되는 파일들의 코드를 직접 수정하세요. 문제되는 파일들은 `mise check`, `mise test` 로 찾을 수 있습니다.
추가적으로 리모트 인스턴스를 위한 테스트도 추가하세요. 너무 복잡한 테스트 말고, 생성, host 유일성 체크 정도만 추가하세요.

Assisted-by: Codex:gpt-5-6-sol
@2chanhaeng
2chanhaeng requested review from dahlia, dodok8 and sij411 August 2, 2026 21:24
@2chanhaeng 2chanhaeng self-assigned this Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Separate local/remote instance at DB level

1 participant