Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop user_device_data table #334

Merged
merged 1 commit into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions cmd/devices-api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ func main() {

subcommands.Register(&syncDeviceTemplatesCmd{logger: logger, settings: settings, pdb: pdb}, "user devices")

subcommands.Register(&fixSignalTimestamps{logger: logger, settings: settings, pdb: pdb}, "data-fixes")

flag.Parse()
os.Exit(int(subcommands.Execute(ctx)))
}
Expand Down
107 changes: 0 additions & 107 deletions cmd/devices-api/temp_fix_signal_timestamps.go

This file was deleted.

19 changes: 19 additions & 0 deletions migrations/20240504105524_drop_user_device_data_table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- +goose Up
-- +goose StatementBegin
DROP TABLE user_device_data;
-- +goose StatementEnd

-- +goose Down
-- +goose StatementBegin
CREATE TABLE user_device_data(
user_device_id char(27) NOT NULL,
integration_id char(27) NOT NULL,
signals jsonb,
error_data jsonb,
last_odometer_event_at timestamptz,
real_last_odometer_event_at timestamptz,
created_at timestamptz NOT NULL DEFAULT current_timestamp,
updated_at timestamptz NOT NULL DEFAULT current_timestamp,
CONSTRAINT user_device_data_pkey PRIMARY KEY (user_device_id, integration_id)
);
-- +goose StatementEnd
2 changes: 0 additions & 2 deletions models/boil_table_names.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading