mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
Activations: add an enabled_at column
For #1140, I considered trying to use the existing fields in a better way, but because we already use the activations table to store preferences, we need to keep all of the existing data and its usage as-is. The enterprise code will use this new column to decide how long the trial period should be.
This commit is contained in:
committed by
jordigh
parent
952544432e
commit
ba7b72b39a
@@ -22,6 +22,15 @@ export class Activation extends BaseEntity {
|
||||
@Column({name: 'updated_at', default: () => "CURRENT_TIMESTAMP"})
|
||||
public updatedAt: Date;
|
||||
|
||||
// When the enterprise activation was first enabled, so we know when
|
||||
// to start counting the trial date.
|
||||
//
|
||||
// Activations are created at Grist installation to track other
|
||||
// things such as prefs, but the user might not enable Enterprise
|
||||
// until later.
|
||||
@Column({name: 'enabled_at', type: nativeValues.dateTimeType, nullable: true})
|
||||
public enabledAt: Date|null;
|
||||
|
||||
public checkProperties(props: any): props is Partial<InstallProperties> {
|
||||
for (const key of Object.keys(props)) {
|
||||
if (!installPropertyKeys.includes(key)) {
|
||||
|
||||
Reference in New Issue
Block a user