1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-05 17:53:12 +02:00

remove archived

This commit is contained in:
andreas-unleash 2022-06-07 10:35:29 +03:00
parent 1812ba03f8
commit 51d1ec09c7
3 changed files with 2 additions and 9 deletions

View File

@ -17,7 +17,6 @@ const FEATURE_COLUMNS = [
'created_at', 'created_at',
'impression_data', 'impression_data',
'last_seen_at', 'last_seen_at',
'archived',
'archived_at', 'archived_at',
]; ];
@ -134,7 +133,7 @@ export default class FeatureToggleStore implements IFeatureToggleStore {
const rows = await this.db const rows = await this.db
.select(FEATURE_COLUMNS) .select(FEATURE_COLUMNS)
.from(TABLE) .from(TABLE)
.where({ archived: true }) .whereNotNull('archived_at')
.orderBy('name', 'asc'); .orderBy('name', 'asc');
return rows.map(this.rowToFeature); return rows.map(this.rowToFeature);
} }
@ -235,7 +234,7 @@ export default class FeatureToggleStore implements IFeatureToggleStore {
const now = new Date(); const now = new Date();
const row = await this.db(TABLE) const row = await this.db(TABLE)
.where({ name }) .where({ name })
.update({ archived: true, archived_at: now }) .update({ archived_at: now })
.returning(FEATURE_COLUMNS); .returning(FEATURE_COLUMNS);
return this.rowToFeature(row[0]); return this.rowToFeature(row[0]);
} }

View File

@ -21,9 +21,6 @@ const schema = {
description: { description: {
type: 'string', type: 'string',
}, },
archived: {
type: 'boolean',
},
project: { project: {
type: 'string', type: 'string',
}, },

View File

@ -192,9 +192,6 @@ Object {
"featureSchema": Object { "featureSchema": Object {
"additionalProperties": false, "additionalProperties": false,
"properties": Object { "properties": Object {
"archived": Object {
"type": "boolean",
},
"archivedAt": Object { "archivedAt": Object {
"format": "date", "format": "date",
"nullable": true, "nullable": true,