How to add a new publication (with authors) - eba-diary/Travelogues-db-conversion GitHub Wiki
Step 1: Add a row to the publications table
The DB should assign an id
automatically. Remember this ID; we'll use it when we add authors to the publication later. Refer to Overview of tables#publications for a description of each column.
Step 2: Add one row each to the travelers table for every contributor/author
The DB should assign an id
to each contributor automatically. Remember these IDs; we'll need this later. Refer to Overview of tables#travelers for a description of each column.
Step 3: Add one row each to the contributions table for every contributor
The DB should assign an id
to each contribution automatically. When you add a row, you MUST provide both the traveler_id
, which is the ID of the traveler who made the contribution, as well as the publication_id
, which is the ID of the publication being contributed to. You do not need to provide a value for the id
column yourself. sqlitebrowser
might tell you that it's mandatory, but the DB should automatically assign it even if you leave it NULL.
The type
column is typically "Author", but it can be "Illustrator" or "Editor" or whatever.
Step 4: Write changes
Remember to write the changes to the DB. If you close the database without writing changes, all your hard work will have been for nothing.