drizzle-kit 0.26.2-a43c673 → 0.26.2-b2b714a

Sign up to get free protection for your applications and to get access to all the features.
package/index.d.mts CHANGED
@@ -124,6 +124,13 @@ type Config = {
124
124
  introspect?: {
125
125
  casing: 'camel' | 'preserve';
126
126
  };
127
+ entities?: {
128
+ roles?: boolean | {
129
+ provider?: 'supabase' | 'neon' | string & {};
130
+ exclude?: string[];
131
+ include?: string[];
132
+ };
133
+ };
127
134
  } & ({
128
135
  dialect: Verify<Dialect, 'turso'>;
129
136
  dbCredentials: {
package/index.d.ts CHANGED
@@ -124,6 +124,13 @@ type Config = {
124
124
  introspect?: {
125
125
  casing: 'camel' | 'preserve';
126
126
  };
127
+ entities?: {
128
+ roles?: boolean | {
129
+ provider?: 'supabase' | 'neon' | string & {};
130
+ exclude?: string[];
131
+ include?: string[];
132
+ };
133
+ };
127
134
  } & ({
128
135
  dialect: Verify<Dialect, 'turso'>;
129
136
  dbCredentials: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.26.2-a43c673",
3
+ "version": "0.26.2-b2b714a",
4
4
  "homepage": "https://orm.drizzle.team",
5
5
  "keywords": [
6
6
  "drizzle",
package/utils.js CHANGED
@@ -5174,6 +5174,12 @@ var sequenceSchema = objectType({
5174
5174
  cycle: booleanType().optional(),
5175
5175
  schema: stringType()
5176
5176
  }).strict();
5177
+ var roleSchema = objectType({
5178
+ name: stringType(),
5179
+ createDb: booleanType().optional(),
5180
+ createRole: booleanType().optional(),
5181
+ inherit: booleanType().optional()
5182
+ }).strict();
5177
5183
  var sequenceSquashed = objectType({
5178
5184
  name: stringType(),
5179
5185
  schema: stringType(),
@@ -5241,6 +5247,14 @@ var uniqueConstraint2 = objectType({
5241
5247
  columns: stringType().array(),
5242
5248
  nullsNotDistinct: booleanType()
5243
5249
  }).strict();
5250
+ var policy = objectType({
5251
+ name: stringType(),
5252
+ as: enumType(["PERMISSIVE", "RESTRICTIVE"]).optional(),
5253
+ for: enumType(["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]).optional(),
5254
+ to: stringType().array().optional(),
5255
+ using: stringType().optional(),
5256
+ withCheck: stringType().optional()
5257
+ }).strict();
5244
5258
  var viewWithOption = objectType({
5245
5259
  checkOption: enumType(["local", "cascaded"]).optional(),
5246
5260
  securityBarrier: booleanType().optional(),
@@ -5321,7 +5335,9 @@ var table2 = objectType({
5321
5335
  foreignKeys: recordType(stringType(), fk2),
5322
5336
  compositePrimaryKeys: recordType(stringType(), compositePK2),
5323
5337
  uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({}),
5324
- checkConstraints: recordType(stringType(), checkConstraint2).default({})
5338
+ policies: recordType(stringType(), policy).default({}),
5339
+ checkConstraints: recordType(stringType(), checkConstraint2).default({}),
5340
+ isRLSEnabled: booleanType().default(false)
5325
5341
  }).strict();
5326
5342
  var schemaHash2 = objectType({
5327
5343
  id: stringType(),
@@ -5416,6 +5432,7 @@ var pgSchemaInternal = objectType({
5416
5432
  schemas: recordType(stringType(), stringType()),
5417
5433
  views: recordType(stringType(), view2).default({}),
5418
5434
  sequences: recordType(stringType(), sequenceSchema).default({}),
5435
+ roles: recordType(stringType(), roleSchema).default({}),
5419
5436
  _meta: objectType({
5420
5437
  schemas: recordType(stringType(), stringType()),
5421
5438
  tables: recordType(stringType(), stringType()),
@@ -5431,7 +5448,9 @@ var tableSquashed2 = objectType({
5431
5448
  foreignKeys: recordType(stringType(), stringType()),
5432
5449
  compositePrimaryKeys: recordType(stringType(), stringType()),
5433
5450
  uniqueConstraints: recordType(stringType(), stringType()),
5434
- checkConstraints: recordType(stringType(), stringType())
5451
+ policies: recordType(stringType(), stringType()),
5452
+ checkConstraints: recordType(stringType(), stringType()),
5453
+ isRLSEnabled: booleanType().default(false)
5435
5454
  }).strict();
5436
5455
  var tableSquashedV42 = objectType({
5437
5456
  name: stringType(),
@@ -5461,7 +5480,8 @@ var pgSchemaSquashed = objectType({
5461
5480
  enums: recordType(stringType(), enumSchema),
5462
5481
  schemas: recordType(stringType(), stringType()),
5463
5482
  views: recordType(stringType(), view2),
5464
- sequences: recordType(stringType(), sequenceSquashed)
5483
+ sequences: recordType(stringType(), sequenceSquashed),
5484
+ roles: recordType(stringType(), roleSchema).default({})
5465
5485
  }).strict();
5466
5486
  var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
5467
5487
  var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
package/utils.mjs CHANGED
@@ -5152,6 +5152,12 @@ var sequenceSchema = objectType({
5152
5152
  cycle: booleanType().optional(),
5153
5153
  schema: stringType()
5154
5154
  }).strict();
5155
+ var roleSchema = objectType({
5156
+ name: stringType(),
5157
+ createDb: booleanType().optional(),
5158
+ createRole: booleanType().optional(),
5159
+ inherit: booleanType().optional()
5160
+ }).strict();
5155
5161
  var sequenceSquashed = objectType({
5156
5162
  name: stringType(),
5157
5163
  schema: stringType(),
@@ -5219,6 +5225,14 @@ var uniqueConstraint2 = objectType({
5219
5225
  columns: stringType().array(),
5220
5226
  nullsNotDistinct: booleanType()
5221
5227
  }).strict();
5228
+ var policy = objectType({
5229
+ name: stringType(),
5230
+ as: enumType(["PERMISSIVE", "RESTRICTIVE"]).optional(),
5231
+ for: enumType(["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]).optional(),
5232
+ to: stringType().array().optional(),
5233
+ using: stringType().optional(),
5234
+ withCheck: stringType().optional()
5235
+ }).strict();
5222
5236
  var viewWithOption = objectType({
5223
5237
  checkOption: enumType(["local", "cascaded"]).optional(),
5224
5238
  securityBarrier: booleanType().optional(),
@@ -5299,7 +5313,9 @@ var table2 = objectType({
5299
5313
  foreignKeys: recordType(stringType(), fk2),
5300
5314
  compositePrimaryKeys: recordType(stringType(), compositePK2),
5301
5315
  uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({}),
5302
- checkConstraints: recordType(stringType(), checkConstraint2).default({})
5316
+ policies: recordType(stringType(), policy).default({}),
5317
+ checkConstraints: recordType(stringType(), checkConstraint2).default({}),
5318
+ isRLSEnabled: booleanType().default(false)
5303
5319
  }).strict();
5304
5320
  var schemaHash2 = objectType({
5305
5321
  id: stringType(),
@@ -5394,6 +5410,7 @@ var pgSchemaInternal = objectType({
5394
5410
  schemas: recordType(stringType(), stringType()),
5395
5411
  views: recordType(stringType(), view2).default({}),
5396
5412
  sequences: recordType(stringType(), sequenceSchema).default({}),
5413
+ roles: recordType(stringType(), roleSchema).default({}),
5397
5414
  _meta: objectType({
5398
5415
  schemas: recordType(stringType(), stringType()),
5399
5416
  tables: recordType(stringType(), stringType()),
@@ -5409,7 +5426,9 @@ var tableSquashed2 = objectType({
5409
5426
  foreignKeys: recordType(stringType(), stringType()),
5410
5427
  compositePrimaryKeys: recordType(stringType(), stringType()),
5411
5428
  uniqueConstraints: recordType(stringType(), stringType()),
5412
- checkConstraints: recordType(stringType(), stringType())
5429
+ policies: recordType(stringType(), stringType()),
5430
+ checkConstraints: recordType(stringType(), stringType()),
5431
+ isRLSEnabled: booleanType().default(false)
5413
5432
  }).strict();
5414
5433
  var tableSquashedV42 = objectType({
5415
5434
  name: stringType(),
@@ -5439,7 +5458,8 @@ var pgSchemaSquashed = objectType({
5439
5458
  enums: recordType(stringType(), enumSchema),
5440
5459
  schemas: recordType(stringType(), stringType()),
5441
5460
  views: recordType(stringType(), view2),
5442
- sequences: recordType(stringType(), sequenceSquashed)
5461
+ sequences: recordType(stringType(), sequenceSquashed),
5462
+ roles: recordType(stringType(), roleSchema).default({})
5443
5463
  }).strict();
5444
5464
  var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
5445
5465
  var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);