Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Question: Removing vehicle from database #706

Closed
Gabtoof opened this issue May 10, 2020 · 5 comments
Closed

Question: Removing vehicle from database #706

Gabtoof opened this issue May 10, 2020 · 5 comments

Comments

@Gabtoof
Copy link

Gabtoof commented May 10, 2020

I had been using Teslamate with 2 cars in my account. Got rid of one of the cars. Is it possible / how do I remove that car from the database?

@Dulanic
Copy link
Collaborator

Dulanic commented May 12, 2020

Easiest way is to run docker exec -it database psql -U teslamate -W teslamate
then just do a select * from cars; and find your old car... look at the id and then do a delete from cars where id = # replacing # /w the right car id.

@kodek
Copy link

kodek commented Oct 8, 2020

Note that if you only delete the rows in the cars table, you'll run into internal errors when visiting TeslaMate's settings page. To fix this, run:

DELETE FROM car_settings WHERE id = 1234;

(where 1234 is the ID removed from the cars table).

To summarize:

docker exec -it my_database_container psql -U teslamate -W teslamate
SELECT id, vin FROM cars;
 id |        vin
----+-------------------
  1 | 5YJ3E1EA2HF123456
  2 | 5YJYGDEF7LF456789
(2 rows)

Assuming 5YJ3E1EA2HF123456 must be removed:

DELETE FROM cars WHERE id = 1;
DELETE FROM car_settings WHERE id = 1;

(Could we get a UI option? :))

@wasnertobias
Copy link

@adriankumpf Can we re-open this feature request? :)

@LightBringer81
Copy link

How is this still not implemented?
I mean you don't even need to own multiple vehicles to run into this problem. As soon as some of your friends or your workplace assign you to any other vehicle than yours, these will appear in the database and there is no "easy" way to remove or at least hide them.

@adriankumpf
Copy link
Collaborator

How is this still not implemented? I mean you don't even need to own multiple vehicles to run into this problem. As soon as some of your friends or your workplace assign you to any other vehicle than yours, these will appear in the database and there is no "easy" way to remove or at least hide them.

Feel free to send a PR with a fix!

@adriankumpf adriankumpf reopened this Jun 24, 2022
@teslamate-org teslamate-org locked and limited conversation to collaborators Jun 24, 2022
@adriankumpf adriankumpf converted this issue into discussion #2719 Jun 24, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants