diff --git a/drizzle/client/0000_chemical_star_brand.sql b/drizzle/client/0000_furry_sebastian_shaw.sql similarity index 96% rename from drizzle/client/0000_chemical_star_brand.sql rename to drizzle/client/0000_furry_sebastian_shaw.sql index 1b0b1d27d..cba69857a 100644 --- a/drizzle/client/0000_chemical_star_brand.sql +++ b/drizzle/client/0000_furry_sebastian_shaw.sql @@ -27,7 +27,6 @@ CREATE TABLE `projectSettings` ( `name` text, `defaultPresets` text, `configMetadata` text, - `isInitialProject` integer NOT NULL, `forks` text NOT NULL ); --> statement-breakpoint diff --git a/drizzle/client/meta/0000_snapshot.json b/drizzle/client/meta/0000_snapshot.json index a1920eaa1..afee14425 100644 --- a/drizzle/client/meta/0000_snapshot.json +++ b/drizzle/client/meta/0000_snapshot.json @@ -1,7 +1,7 @@ { "version": "5", "dialect": "sqlite", - "id": "41e23fc3-463e-432a-9a5f-7c20366d6294", + "id": "70f3b09a-a450-43f6-800a-1693b37c2ecb", "prevId": "00000000-0000-0000-0000-000000000000", "tables": { "localDeviceInfo": { @@ -176,13 +176,6 @@ "notNull": false, "autoincrement": false }, - "isInitialProject": { - "name": "isInitialProject", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, "forks": { "name": "forks", "type": "text", diff --git a/drizzle/client/meta/_journal.json b/drizzle/client/meta/_journal.json index 1ca0aaeb7..f5f7da4a2 100644 --- a/drizzle/client/meta/_journal.json +++ b/drizzle/client/meta/_journal.json @@ -5,8 +5,8 @@ { "idx": 0, "version": "5", - "when": 1725381616476, - "tag": "0000_chemical_star_brand", + "when": 1726451496091, + "tag": "0000_furry_sebastian_shaw", "breakpoints": true } ] diff --git a/drizzle/project/0000_tan_glorian.sql b/drizzle/project/0000_confused_lady_bullseye.sql similarity index 100% rename from drizzle/project/0000_tan_glorian.sql rename to drizzle/project/0000_confused_lady_bullseye.sql diff --git a/drizzle/project/meta/0000_snapshot.json b/drizzle/project/meta/0000_snapshot.json index 074b52899..a386812de 100644 --- a/drizzle/project/meta/0000_snapshot.json +++ b/drizzle/project/meta/0000_snapshot.json @@ -1,7 +1,7 @@ { "version": "5", "dialect": "sqlite", - "id": "b06de2c5-6a4c-4578-a8f0-d15f9f20e902", + "id": "9979bd60-29d8-4bb5-a843-62a88650755d", "prevId": "00000000-0000-0000-0000-000000000000", "tables": { "coreOwnership_backlink": { diff --git a/drizzle/project/meta/_journal.json b/drizzle/project/meta/_journal.json index dc2730e3e..edc6b216f 100644 --- a/drizzle/project/meta/_journal.json +++ b/drizzle/project/meta/_journal.json @@ -5,8 +5,8 @@ { "idx": 0, "version": "5", - "when": 1725381611574, - "tag": "0000_tan_glorian", + "when": 1726451493242, + "tag": "0000_confused_lady_bullseye", "breakpoints": true } ] diff --git a/src/mapeo-manager.js b/src/mapeo-manager.js index 956dc6709..1a8a0c869 100644 --- a/src/mapeo-manager.js +++ b/src/mapeo-manager.js @@ -351,17 +351,13 @@ export class MapeoManager extends TypedEmitter { * Create a new project. * @param {( * import('type-fest').Simplify<( - * Partial> & + * Partial> & * { configPath?: string } * )> * )} [options] * @returns {Promise} Project public id */ - async createProject({ - name, - configPath = this.#defaultConfigPath, - isInitialProject = false, - } = {}) { + async createProject({ name, configPath = this.#defaultConfigPath } = {}) { // 1. Create project keypair const projectKeypair = KeyManager.generateProjectKeypair() @@ -406,7 +402,7 @@ export class MapeoManager extends TypedEmitter { }) // 5. Write project settings to project instance - await project.$setProjectSettings({ name, isInitialProject }) + await project.$setProjectSettings({ name }) // 6. Write device info into project const deviceInfo = this.getDeviceInfo() diff --git a/src/mapeo-project.js b/src/mapeo-project.js index 9748ca1bd..02aed8487 100644 --- a/src/mapeo-project.js +++ b/src/mapeo-project.js @@ -540,7 +540,6 @@ export class MapeoProject extends TypedEmitter { await projectSettings[kCreateWithDocId](this.#projectId, { ...settings, schemaName: 'projectSettings', - isInitialProject: Boolean(settings.isInitialProject), }) ) } diff --git a/test-e2e/manager-basic.js b/test-e2e/manager-basic.js index e24bf0279..cc55bd599 100644 --- a/test-e2e/manager-basic.js +++ b/test-e2e/manager-basic.js @@ -26,10 +26,7 @@ test('Managing created projects', async (t) => { }) const project1Id = await manager.createProject() - const project2Id = await manager.createProject({ - name: 'project 2', - isInitialProject: true, - }) + const project2Id = await manager.createProject({ name: 'project 2' }) await t.test('initial information from listed projects', async () => { const listedProjects = await manager.listProjects() @@ -70,7 +67,6 @@ test('Managing created projects', async (t) => { name: undefined, defaultPresets: undefined, configMetadata: undefined, - isInitialProject: false, }, 'undefined name and default presets for project1' ) @@ -80,7 +76,6 @@ test('Managing created projects', async (t) => { name: 'project 2', defaultPresets: undefined, configMetadata: undefined, - isInitialProject: true, }, 'matched name for project2 with undefined default presets' ) diff --git a/test-e2e/project-settings.js b/test-e2e/project-settings.js index ae5efc5fe..f92daa3d8 100644 --- a/test-e2e/project-settings.js +++ b/test-e2e/project-settings.js @@ -40,8 +40,8 @@ test('Project settings create, read, and update operations', async () => { assert.deepEqual( removeUndefinedFields(initialSettings), - { isInitialProject: false }, - 'project has no settings, other than "is initial project?", after creation' + {}, + 'project has no settings after creation' ) const expectedSettings = {