diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f00bbc2904..fc4dcdcd5b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,7 +73,7 @@ jobs: strategy: matrix: node: [12, 14, 16] - max-parallel: 2 + max-parallel: 3 services: postgres: # Docker Hub image @@ -109,7 +109,7 @@ jobs: strategy: matrix: node: [12, 14, 16] - max-parallel: 2 + max-parallel: 3 services: mysql: image: mysql @@ -140,11 +140,11 @@ jobs: e2e_ce_mysql_5: runs-on: ubuntu-latest needs: [lint, unit_back, unit_front] - name: '[CE] E2E (mysql, node: ${{ matrix.node }})' + name: '[CE] E2E (mysql:5 , node: ${{ matrix.node }})' strategy: matrix: node: [12, 14, 16] - max-parallel: 2 + max-parallel: 3 services: mysql: image: mysql:5 @@ -179,7 +179,7 @@ jobs: strategy: matrix: node: [12, 14, 16] - max-parallel: 2 + max-parallel: 3 steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2-beta @@ -201,7 +201,7 @@ jobs: strategy: matrix: node: [12, 14, 16] - max-parallel: 2 + max-parallel: 3 services: postgres: # Docker Hub image @@ -241,7 +241,7 @@ jobs: strategy: matrix: node: [12, 14, 16] - max-parallel: 2 + max-parallel: 3 services: mysql: image: mysql @@ -280,7 +280,7 @@ jobs: strategy: matrix: node: [12, 14, 16] - max-parallel: 2 + max-parallel: 3 steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2-beta diff --git a/examples/getstarted/config/database.js b/examples/getstarted/config/database.js index d78eb0ebc8..f1ada25a0f 100644 --- a/examples/getstarted/config/database.js +++ b/examples/getstarted/config/database.js @@ -4,6 +4,7 @@ const sqlite = { filename: '.tmp/data.db', }, useNullAsDefault: true, + debug: true, }; const postgres = { diff --git a/packages/core/database/lib/dialects/sqlite/schema-inspector.js b/packages/core/database/lib/dialects/sqlite/schema-inspector.js index cd0d2bd0df..538c0ba0ca 100644 --- a/packages/core/database/lib/dialects/sqlite/schema-inspector.js +++ b/packages/core/database/lib/dialects/sqlite/schema-inspector.js @@ -50,7 +50,6 @@ const toStrapiType = column => { case 'time': { return { type: 'time', args: [{ precision: 3 }] }; } - // TODO: enum default: { return { type: 'specificType', args: [column.data_type] }; } @@ -107,26 +106,16 @@ class SqliteSchemaInspector { } async getIndexes(tableName) { - // const cols = await this.db.connection.raw(SQL_QUERIES.TABLE_INFO, [tableName]); const indexes = await this.db.connection.raw(SQL_QUERIES.INDEX_LIST, [tableName]); const ret = []; - // for (const col of cols.filter(c => c.pk)) { - // ret.push({ - // columns: [col.name], - // type: 'primary', - // }); - // } - // merge pk together - for (const index of indexes.filter(index => !index.name.startsWith('sqlite_'))) { const res = await this.db.connection.raw(SQL_QUERIES.INDEX_INFO, [index.name]); ret.push({ columns: res.map(row => row.name), name: index.name, - // TODO: find other index types type: index.unique ? 'unique' : null, }); } diff --git a/packages/core/strapi/tests/components/single-required.test.e2e.js b/packages/core/strapi/tests/components/single-required.test.e2e.js index 458d0f5a81..0db48b27e0 100644 --- a/packages/core/strapi/tests/components/single-required.test.e2e.js +++ b/packages/core/strapi/tests/components/single-required.test.e2e.js @@ -228,7 +228,12 @@ describe('Non repeatable and required component', () => { }); expect(updateRes.statusCode).toBe(200); - expect(updateRes.body.data).toMatchObject(res.body.data); + expect(updateRes.body.data).toMatchObject({ + id: res.body.data.id, + attributes: { + field: res.body.data.attributes.field, + }, + }); const getRes = await rq.get(`/${res.body.data.id}`, { qs: { @@ -237,7 +242,12 @@ describe('Non repeatable and required component', () => { }); expect(getRes.statusCode).toBe(200); - expect(getRes.body.data).toMatchObject(res.body.data); + expect(getRes.body.data).toMatchObject({ + id: res.body.data.id, + attributes: { + field: res.body.data.attributes.field, + }, + }); }); test('Throws if component is null', async () => {