0

My database of Odoo have multiple websites. I need to delete one of this website with postgres.

Can I do this :

DROP the_name_of_the_website IF EXISTS  

2 Answers2

1

Julie Losange

This thing you can do by the Odoo UI, If you activate the developer mode you can see

 Website -> Configuration -> Websites

from here you can choose the website and delete it.

And On Postgres :

delete from website where id=YOUR WEBSITE ID;
Dipen Shah
  • 2,396
  • 2
  • 9
  • 21
0

DROP DATABASE [ IF EXISTS ] name is the correct syntax, so

DROP DATABASE IF EXISTS the_name_of_the_website

in your case.

See Postgres Documentation

Lars Skaug
  • 1,376
  • 1
  • 7
  • 13
  • Thank you @LarsSkaug for your response, but here, if i do that, the database will be deleted, right ? I need only the website to delete.. – Dalila Hannouche Jul 25 '20 at 18:35
  • Yes, this will only delete a database in Postgres. I am not familiar with Odoo, but I would assume that you would get an error if the database cannot be found. – Lars Skaug Jul 25 '20 at 18:45