Skip to content

Commit e44d9bb

Browse files
Add updated_at column (#4106)
Add the `updated_at` column to `neon_auth.users_sync` and rename the file to `neon-auth` Co-authored-by: Andrii Sherman <andreysherman11@gmail.com>
1 parent ac1dcd9 commit e44d9bb

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

drizzle-orm/src/neon/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export * from './neon-identity.ts';
1+
export * from './neon-auth.ts';
22
export * from './rls.ts';

drizzle-orm/src/neon/neon-identity.ts renamed to drizzle-orm/src/neon/neon-auth.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ export const usersSync = neonAuthSchema.table('users_sync', {
1616
email: text(),
1717
createdAt: timestamp('created_at', { withTimezone: true, mode: 'string' }),
1818
deletedAt: timestamp('deleted_at', { withTimezone: true, mode: 'string' }),
19+
updatedAt: timestamp('updated_at', { withTimezone: true, mode: 'string' }),
1920
});

integration-tests/tests/bun/bun-sql.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import {
3737
import type { BunSQLDatabase } from 'drizzle-orm/bun-sql';
3838
import { drizzle } from 'drizzle-orm/bun-sql';
3939
import { authenticatedRole, crudPolicy } from 'drizzle-orm/neon';
40-
import { usersSync } from 'drizzle-orm/neon/neon-identity';
40+
import { usersSync } from 'drizzle-orm/neon/neon-auth';
4141
import type { PgColumn, PgDatabase, PgQueryResultHKT } from 'drizzle-orm/pg-core';
4242
import {
4343
alias,
@@ -4768,7 +4768,7 @@ test('neon: neon_auth', () => {
47684768

47694769
expect(name).toBe('users_sync');
47704770
expect(schema).toBe('neon_auth');
4771-
expect(columns).toHaveLength(6);
4771+
expect(columns).toHaveLength(7);
47724772
});
47734773

47744774
test('Enable RLS function', () => {

integration-tests/tests/pg/pg-common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5455,7 +5455,7 @@ export function tests() {
54555455

54565456
expect(name).toBe('users_sync');
54575457
expect(schema).toBe('neon_auth');
5458-
expect(columns).toHaveLength(6);
5458+
expect(columns).toHaveLength(7);
54595459
});
54605460

54615461
test('Enable RLS function', () => {

0 commit comments

Comments
 (0)