()
| 723 | }, |
| 724 | |
| 725 | async indexesTestCase1() { |
| 726 | const client = new PGlite(); |
| 727 | |
| 728 | const schema1 = { |
| 729 | users: pgTable( |
| 730 | 'users', |
| 731 | { |
| 732 | id: uuid('id').defaultRandom().primaryKey(), |
| 733 | name: text('name').notNull(), |
| 734 | description: text('description'), |
| 735 | imageUrl: text('image_url'), |
| 736 | inStock: boolean('in_stock').default(true), |
| 737 | }, |
| 738 | (t) => ({ |
| 739 | indx: index().on(t.id.desc().nullsFirst()), |
| 740 | indx1: index('indx1').on(t.id, t.imageUrl), |
| 741 | indx2: index('indx4').on(t.id), |
| 742 | }), |
| 743 | ), |
| 744 | }; |
| 745 | |
| 746 | const schema2 = { |
| 747 | users: pgTable( |
| 748 | 'users', |
| 749 | { |
| 750 | id: uuid('id').defaultRandom().primaryKey(), |
| 751 | name: text('name').notNull(), |
| 752 | description: text('description'), |
| 753 | imageUrl: text('image_url'), |
| 754 | inStock: boolean('in_stock').default(true), |
| 755 | }, |
| 756 | (t) => ({ |
| 757 | indx: index().on(t.id.desc().nullsFirst()), |
| 758 | indx1: index('indx1').on(t.id, t.imageUrl), |
| 759 | indx2: index('indx4').on(t.id), |
| 760 | }), |
| 761 | ), |
| 762 | }; |
| 763 | |
| 764 | const { statements, sqlStatements } = await diffTestSchemasPush(client, schema1, schema2, [], false, ['public']); |
| 765 | |
| 766 | expect(statements.length).toBe(0); |
| 767 | }, |
| 768 | |
| 769 | async addNotNull() { |
| 770 | const client = new PGlite(); |
nothing calls this directly
no test coverage detected