调整models定义

This commit is contained in:
2025-11-07 22:19:55 +08:00
parent 2796d9bad7
commit d3207cc2b8
3 changed files with 49 additions and 23 deletions

View File

@@ -179,6 +179,7 @@ func (ps *PostgresStorage) creatingHyperTable(ctx context.Context) error {
{models.PigPurchase{}, "purchase_date"},
{models.PigSale{}, "sale_date"},
{models.Notification{}, "alarm_timestamp"},
{models.HistoricalAlarm{}, "trigger_time"},
}
for _, table := range tablesToConvert {
@@ -221,6 +222,7 @@ func (ps *PostgresStorage) applyCompressionPolicies(ctx context.Context) error {
{models.PigPurchase{}, "pig_batch_id"},
{models.PigSale{}, "pig_batch_id"},
{models.Notification{}, "user_id"},
{models.HistoricalAlarm{}, "source_id"},
}
for _, policy := range policies {