neondatabase-labs / social-network-drizzle-rls

4 stars 0 forks source link

Fix schema #6

Closed pffigueiredo closed 2 weeks ago

pffigueiredo commented 2 weeks ago

Description

This PR aims to fix the existing schema.ts file, so it's fully functional with a real application.

FIXES

  1. update drizzle and drizzle-kit to latest pinned version
  2. use drizzle imports from the latest version and delete the index.ts file
  3. multiple changes to the schema (more info with the comments inline)

Test Plan

I tested all the functionalities of this schema by creating a small APP, without any where user_id = auth. user_id(), so we only rely on RLS rules to filter the information.

https://github.com/user-attachments/assets/54938405-3cac-4fc5-b38e-9f291c46525e

davidgomes commented 2 weeks ago

@pffigueiredo can you convert your PR comments into code comments and then resolve them please?

pffigueiredo commented 2 weeks ago

@pffigueiredo can you convert your PR comments into code comments and then resolve them please?

Of course, done in this commit: 6b964838dea05fc79a68d82db03fd85f0d7111a8