Page 1 of 1

importing notes

PostPosted: Sun Oct 02, 2022 5:44 am
by Florian87
What does happen when we export/import notes and there were already notes for such player ? Do they all add up together or do the later import erases the previous notes ?
thanks

Re: importing notes

PostPosted: Sun Oct 02, 2022 11:58 am
by Flag_Hippo
If you import notes into another database then those notes are added to the existing notes in that database. Also if the same note exists in both databases then the note text is appended meaning that it will be doubled up so this isn't ideal if you are going to import notes from one database into another and then back again. If you want to delete existing notes before importing then there isn't a built-in method so you'll need to use PGAdmin and run the following query:

Code: Select all
TRUNCATE TABLE notes;

To do that double click on PostgreSQL x.y' (where x.y is your PostgreSQL version) and if your prompted for a password the default is "dbpass" (without the quotes), expand 'Databases' and then select your database. The query tool can be opened via its icon in PGAdmin or via 'Tools -> Query Tool' and then you can run the query using 'Query -> Execute'. I'd recommend backing up your poker data before making any changes since PGAdmin is connected directly to your database so take care not to make any other unintended changes to your data while using it.