Skip to content

Fix duplicate table definitions in schema.ts causing 127 TypeScript compilation errors #509

Description

@DeFiVC

Bug Description

The database schema file src/database/schema.ts has duplicate table definitions for four tables, plus a duplicate column definition in the users table. This causes the TypeScript compiler to fail with 127 errors, making the project completely uncompilable.

Affected Tables

The following tables are defined twice in src/database/schema.ts:

  1. announcements - Lines ~357-378 AND ~595-614
  2. courseShares - Lines ~131-157 AND ~617-641
  3. courseReviews - Lines ~298-327 AND ~644-667
  4. notifications - Lines ~331-353 AND ~670-689

Additionally, the users table (lines ~25-64) defines bannedAt twice:

  • Line 43: bannedAt: timestamp("banned_at", { withTimezone: true })
  • Line 61: bannedAt: timestamp("banned_at", { withTimezone: true })

Impact

  • TypeScript compilation fails with 127 errors
  • Cannot run npm run typecheck, npm run build, or npm test
  • The project is completely broken for development

Steps to Reproduce

  1. Run npm install
  2. Run npx tsc --noEmit -p tsconfig.test.json
  3. Observe 127 compilation errors

Expected Behavior

All tables should be defined exactly once in the schema file. The project should compile without errors.

Acceptance Criteria

  • Remove duplicate table definitions (keep the first/most complete version of each)
  • Remove duplicate bannedAt column from users table
  • Verify npm run typecheck passes with zero errors
  • Verify all imports across the codebase still resolve correctly

Severity

critical - The project cannot be compiled or tested in its current state.

Activity

  1. damilare0813 commented on Sep 30, 2026

    @damilare0813

    @damilare0813 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hi maintainer, I'd very much appreciate the opportunity to work on this issue.
    Having reviewed the acceptance criteria, I'm confident that I'd be able to have a PR up shortly after being assigned.
    Kindly assign this issue to me.
    Thank you!

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @damilare0813 to this issue.

  2. Duyicoda commented on Sep 30, 2026

    @Duyicoda

    @Duyicoda has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hi maintainer I would like to work on this issue, thank you.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Duyicoda to this issue.

  3. osasfaith commented on Sep 30, 2026

    @osasfaith
    Contributor

    @osasfaith has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    I would love to work on this issue.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @osasfaith to this issue.

  4. CryptoverseOG commented on Sep 30, 2026

    @CryptoverseOG

    @CryptoverseOG has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hello Maintainer, I’ve taken a close look at this issue and understand the work involved. I’m ready to dedicate the necessary time and would appreciate the chance to work on it.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @CryptoverseOG to this issue.

  5. Baytizz commented on Sep 30, 2026

    @Baytizz

    @Baytizz has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hello maintainer, I have gone through the bug description and I am confident that I can implement a proper solution that matches the acceptance criteria. Please assign the issue to me

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Baytizz to this issue.

  6. leadgenexpert454 commented on Sep 30, 2026

    @leadgenexpert454

    @leadgenexpert454 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hello Maintainer I can work on this issue

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @leadgenexpert454 to this issue.

  7. Vivianndev commented on Sep 30, 2026

    @Vivianndev

    @Vivianndev has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hi, I'd genuinely love to resolve this issue. Plss assign to me thanks

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Vivianndev to this issue.

  8. drips-wave commented on Sep 30, 2026

    @drips-wave

    Congratulations, @osasfaith! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on September 30, 2026.

    🧑‍💻 @osasfaith: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  9. grantfox-oss commented on Oct 1, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @osasfaith's PR #545 was approved and merged by @DeFiVC.

    🏆 @osasfaith: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (732 total points). Track your full progress on GrantFox.

    👏 Great work, @osasfaith! Keep contributing to ChainLearnOfficial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions