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

View File

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

View File

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