Koha Test Wiki MediaWiki Postgres
One of a series of test instances for migrating the Koha Wiki MediaWiki database.
For the current Koha Wiki, visit https://wiki.koha-community.org .Subscriptions endpoint RFC
From Koha Test Wiki MediaWiki Postgres
This RFC should be the basis for writing an endpoint for CRUD operations on subscriptions following the guidelines.
Contents |
Actions and routes
TODO
subscription object definition
DB schema | Proposed API | Katrin | Details |
biblionumber | biblio_id | biblio_id | foreign key for biblio.biblionumber that this subscription is attached to |
subscriptionid | subscription_id | subscription_id | unique key for this subscription |
librarian | user_id | user_id | librarian's username from borrowers.userid |
startdate | start_date | start_date | ` date default NULL, -- start date for this subscription |
aqbooksellerid | ?? | vendor_id | int(11) default 0, -- foreign key for aqbooksellers.id to link to the vendor |
cost | ?? | price | int(11) default 0, |
aqbudgetid | ?? | fund_id | int(11) default 0, |
weeklength | ?? | length_in_weeks | int(11) default 0, -- subscription length in weeks (will not be filled in if monthlength or numberlength is set) |
monthlength | ?? | length_in_months | int(11) default 0, -- subscription length in weeks (will not be filled in if weeklength or numberlength is set) |
numberlength | ?? | length_in_issues | int(11) default 0, -- subscription length in weeks (will not be filled in if monthlength or weeklength is set) |
periodicity | ?? | frequency_id | integer default null, -- frequency type links to subscription_frequencies.id |
countissuesperunit | ?? | issues_per_unit | INTEGER NOT NULL DEFAULT 1, |
notes | ?? | notes | LONGTEXT, -- notes |
status | ?? | status | varchar(100) NOT NULL default , -- status of this subscription |
lastvalue1 | ?? | last_value_1 | int(11) default NULL, |
innerloop1 | ?? | inner_counter_1 | int(11) default 0, |
lastvalue2 | ?? | last_value_2 | int(11) default NULL, |
innerloop2 | ?? | inner_counter_2 | int(11) default 0, |
lastvalue3 | ?? | last_value_3 | int(11) default NULL, |
innerloop3 | ?? | inner_counter_3 | int(11) default 0, |
firstacquidate | ?? | first_issue_date | date default NULL, -- first issue received date |
manualhistory | ?? | manual_history (BOOLEAN?) | tinyint(1) NOT NULL default 0, -- yes or no to managing the history manually |
irregularity | ?? | irregularities | MEDIUMTEXT, -- any irregularities in the subscription |
skip_serialseq | ?? | skip_issue_numbers | BOOLEAN NOT NULL DEFAULT 0, |
letter | ?? | notice_code | varchar(20) default NULL, |
numberpattern | ?? | numbering_pattern_id | integer default null, -- the numbering pattern used links to subscription_numberpatterns.id |
locale | ?? | locale | VARCHAR(80) DEFAULT NULL, -- for foreign language subscriptions to display months, seasons, etc correctly |
distributedto | ?? | UNUSED? | MEDIUMTEXT, |
internalnotes | ?? | internal_notes | LONGTEXT, |
callnumber | ?? | callnumber | MEDIUMTEXT, -- default call number |
location | ?? | location | varchar(80) NULL default , -- default shelving location (items.location) |
branchcode | ?? | library_id | varchar(10) NOT NULL default , -- default branches (items.homebranch) |
lastbranch | ?? | UNUSED? | varchar(10), |
serialsadditems | ?? | add_items | tinyint(1) NOT NULL default '0', -- does receiving this serial create an item record |
staffdisplaycount | ?? | staff_display_count | VARCHAR(10) NULL, -- how many issues to show to the staff |
opacdisplaycount | ?? | opac_display_count | VARCHAR(10) NULL, -- how many issues to show to the public |
graceperiod | ?? | grace_period | int(11) NOT NULL default '0', -- grace period in days |
enddate | ?? | end_date | date default NULL, -- subscription end date |
closed | ?? | ended / cancelled (BOOLEAN) | INT(1) NOT NULL DEFAULT 0, -- yes / no if the subscription is closed |
reneweddate | ?? | renewal_date | date default NULL, -- date of last renewal for the subscription |
itemtype | ?? | item_type | VARCHAR( 10 ) NULL, |
previousitemtype | ?? | previous_item_type | VARCHAR( 10 ) NULL, |
mana_id | ?? | mana_id | int(11) NULL DEFAULT NULL, |
Comment
Not sure if this is ready for voting yet. As there were a lot of blanks to fill, I've added a new column above with my suggestions.
- user_id = We should really fix Bug 13542, but until we do, the API should still accept a valid patron_id hat is translated to a userid internally.
- letter = We haven't done letter yet. Letter has a combined primary key of module, code and banchcode. Here the code is used, so I suggest: notice_code.
--Kfischer 18:26, 12 January 2020 (EST)