chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:10:05 +08:00
commit d37d8d293b
1388 changed files with 484182 additions and 0 deletions
@@ -0,0 +1,8 @@
# drizzle-orm-pg 0.12.0-beta.40
- Added prepared statements and placeholders support.
- Refactored `.select().fields()` to allow fields from joined tables and nested objects structure, removed partial selects from joins.
- Allowed passing query builders to `db.execute`.
- Optimized INSERT query generation for single values by skipping columns without values.
- Exposed `table` property from index config.
- Removed testing utils.
+3
View File
@@ -0,0 +1,3 @@
# drizzle-orm-pg 0.13.0
- Release 🎉
+3
View File
@@ -0,0 +1,3 @@
# drizzle-orm-pg 0.13.1
- Implemented node-pg prepared statements usage via adding `name` argument to `.prepare()` method.
+3
View File
@@ -0,0 +1,3 @@
# drizzle-orm-pg 0.13.2
- Fix prepared statements usage.
+4
View File
@@ -0,0 +1,4 @@
# drizzle-orm-pg 0.13.3
- Implemented NeonDB serverless driver support.
- (internal) Added `session.all()` and `session.values()` methods.
+3
View File
@@ -0,0 +1,3 @@
# drizzle-orm-pg 0.13.4
- Fixed types for IndexBuilder.
+8
View File
@@ -0,0 +1,8 @@
# drizzle-orm-pg 0.14.0
- Separated migrations functionality to a separate import:
```typescript
import { migrate } from 'drizzle-orm-pg/node/migrate';
```
- Replaced `await new PgConnector(client).connect()` with `drizzle(client)`.
- `import { PgConnector } from 'drizzle-orm-pg` -> `import { drizzle } from 'drizzle-orm-pg/node`.
+3
View File
@@ -0,0 +1,3 @@
# drizzle-orm-pg 0.14.1
- Bumped everything to 0.14.1.
+3
View File
@@ -0,0 +1,3 @@
# drizzle-orm-pg 0.14.2
- Bumped everything to 0.14.2
+6
View File
@@ -0,0 +1,6 @@
# drizzle-orm-pg 0.14.3
- Fixed `.onConflict` statement query builder. In previous versions target column was mapped together with table name
- Added documentation examples for `onConflict`
- Added documentation examples for returning statements for insert/update/delete
- Add more tests for `onConflict` query builder
+3
View File
@@ -0,0 +1,3 @@
# drizzle-orm-pg 0.14.4
- Fill author field in package.json
+41
View File
@@ -0,0 +1,41 @@
# drizzle-orm-pg 0.15.0
- Set `notNull` to `true` in runtime, when `.primaryKey()` function was used in `ColumnBuilder`
- Set `no action` for `OnDelete` and `OnUpdate` in runtime by default
- Add internal version for ORM api
- Index name now becomes optional. You can write either `index('usersNameIdx')` or `index()`. In last case, drizzle will generate index name automatically based on table and column index was created on
## Breaking changes
`foreignKey()` function api changes. Previosuly you need to pass callback function with table columns for FK. Right now no need for callback, just object with data for FK
#### Before
```typescript
export const usersTable = pgTable(
'users_table',
{
id: serial('id').primaryKey(),
uuid: uuid('uuid').defaultRandom().notNull(),
homeCity: integer('home_city').notNull()
},
(users) => ({
// foreignKey had a callback as param
usersCityFK: foreignKey(() => ({ columns: [users.homeCity], foreignColumns: [cities.id] })),
}),
);
```
#### Now
```typescript
export const usersTable = pgTable(
'users_table',
{
id: serial('id').primaryKey(),
uuid: uuid('uuid').defaultRandom().notNull(),
homeCity: integer('home_city').notNull()
},
(users) => ({
// foreignKey doesn't have a callback as param
usersCityFK: foreignKey({ columns: [users.homeCity], foreignColumns: [cities.id] }),
}),
);
```
+39
View File
@@ -0,0 +1,39 @@
# drizzle-orm-pg 0.15.1
Add support for schemas -> [PostgreSQL schemas](https://www.postgresql.org/docs/current/ddl-schemas.html)
---
Drizzle won't append any schema before table definition by default. So if your tables are in `public` schema drizzle generate -> `select * from "users"`
But if you will specify any custom schema you want, then drizzle will generate -> `select * from "custom_schema"."users"`
> **Warning**
> If you will have tables with same names in different schemas then drizzle will respond with `never[]` error in result types and error from database
>
> In this case you may use [alias syntax](https://github.com/drizzle-team/drizzle-orm/tree/main/drizzle-orm-pg#join-aliases-and-self-joins)
---
Usage example
```typescript
// Table in default schema
const publicUsersTable = pgTable('users', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
verified: boolean('verified').notNull().default(false),
jsonb: jsonb<string[]>('jsonb'),
createdAt: timestamp('created_at', { withTimezone: true }).notNull().defaultNow(),
});
// Table in custom schema
const mySchema = pgSchema('mySchema');
const usersTable = mySchema('users', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
verified: boolean('verified').notNull().default(false),
jsonb: jsonb<string[]>('jsonb'),
createdAt: timestamp('created_at', { withTimezone: true }).notNull().defaultNow(),
});
```
+3
View File
@@ -0,0 +1,3 @@
# drizzle-orm-pg 0.15.2
Internal release
+3
View File
@@ -0,0 +1,3 @@
# drizzle-orm-pg 0.15.3
Internal release
+3
View File
@@ -0,0 +1,3 @@
# drizzle-orm-pg 0.16.0
- Implemented [postgres.js](https://github.com/porsager/postgres) driver support ([docs](/drizzle-orm-pg/src/postgres-js/README.md))
+3
View File
@@ -0,0 +1,3 @@
# drizzle-orm-pg 0.16.1
- Fix documentation links
+17
View File
@@ -0,0 +1,17 @@
- Add possibility to define database custom data types
Example usage:
```typescript
const customText = customType<{ data: string }>({
dataType() {
return 'text';
},
});
const usersTable = pgTable('users', {
name: customText('name').notNull(),
});
```
For more examples please check [docs](https://github.com/drizzle-team/drizzle-orm/blob/main/docs/custom-types.lite.md)
+3
View File
@@ -0,0 +1,3 @@
# drizzle-orm-pg 0.16.3
- Fix peer dependency error for >=0.16 drizzle packages