Add alternate serial content from Lebbeous.
[working/Evergreen.git] / 2.0 / appendices / schema.xml
1 <?xml version="1.0" encoding="UTF-8" ?>\r
2 <appendix id="databaseschema">\r
3         <title>Database Schema</title>\r
4         <para>This is the schema for the Evergreen database.</para>\r
5         \r
6         <section id="acq.schema">\r
7                 <title>Schema acq</title>\r
8                 \r
9                 <simplesect id="acq.table.currency-type" xreflabel="acq.currency_type">         \r
10                         <title>currency_type</title>\r
11                         <informaltable>\r
12                                 <tgroup cols="3">\r
13                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
14                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
15                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
16                                         <thead>\r
17                                                 <row>\r
18                                                         <entry>Field</entry>\r
19                                                         <entry>Data Type</entry>\r
20                                                         <entry>Constraints and References</entry>\r
21                                                 </row>\r
22                                                 </thead>\r
23                                                 <tbody>\r
24                                                 \r
25                                                         <row>\r
26                                                                 <entry>code</entry>\r
27                                                                 <entry>text</entry>\r
28                                                                 <entry>PRIMARY KEY</entry>\r
29                                                         </row>\r
30                                                 \r
31                                                         <row>\r
32                                                                 <entry>label</entry>\r
33                                                                 <entry>text</entry>\r
34                                                                 <entry></entry>\r
35                                                         </row>          \r
36                                                 </tbody>\r
37                                         </tgroup>\r
38                                 </informaltable>\r
39                                 <para>\r
40                                         <itemizedlist>\r
41                                                 <title>Tables referencing acq.exchange_rate via Foreign Key Constraints</title>\r
42                                 \r
43                                                         <listitem>\r
44                                                                 <para><xref linkend="acq.table.exchange-rate"/></para>\r
45                                                         </listitem><listitem>\r
46                                                                 <para><xref linkend="acq.table.fund"/></para>\r
47                                                         </listitem><listitem>\r
48                                                                 <para><xref linkend="acq.table.fund-debit"/></para>\r
49                                                         </listitem>\r
50                                                         <listitem>\r
51                                                                 <para><xref linkend="acq.table.funding-source"/></para>\r
52                                                         </listitem>\r
53                                                         <listitem>\r
54                                                                 <para><xref linkend="acq.table.provider"/></para>\r
55                                                         </listitem>\r
56                                                         \r
57                                         </itemizedlist>\r
58                         </para>\r
59                 </simplesect>\r
60                 \r
61                 <simplesect id="acq.table.distribution-formula" xreflabel="acq.distribution_formula">           \r
62                         <title>distribution_formula</title>\r
63                         <informaltable>\r
64                                 <tgroup cols="3">\r
65                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
66                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
67                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
68                                         <thead>\r
69                                                 <row>\r
70                                                         <entry>Field</entry>\r
71                                                         <entry>Data Type</entry>\r
72                                                         <entry>Constraints and References</entry>\r
73                                                 </row>\r
74                                                 </thead>\r
75                                                 <tbody>\r
76                                                 \r
77                                                         <row>\r
78                                                                 <entry>id</entry>\r
79                                                                 <entry>serial</entry>\r
80                                                                 <entry>PRIMARY KEY</entry>\r
81                                                         </row>\r
82                                                 \r
83                                                         <row>\r
84                                                                 <entry>owner</entry>\r
85                                                                 <entry>integer</entry>\r
86                                                                 <entry>UNIQUE#1; NOT NULL; <xref linkend="actor.table.org-unit"/></entry>\r
87                                                         </row>\r
88                                                 \r
89                                                         <row>\r
90                                                                 <entry>name</entry>\r
91                                                                 <entry>text</entry>\r
92                                                                 <entry>UNIQUE#1; NOT NULL;</entry>\r
93                                                         </row>\r
94                                                 \r
95                                                         <row>\r
96                                                                 <entry>skip_count</entry>\r
97                                                                 <entry>integer</entry>\r
98                                                                 <entry>NOT NULL;</entry>\r
99                                                         </row>\r
100                                                 \r
101                                                 </tbody>\r
102                                         </tgroup>\r
103                                 </informaltable>\r
104                                 <para>\r
105                                 \r
106                                 \r
107                                 \r
108                                         <itemizedlist>\r
109                                                 <title>\r
110                                                         Tables referencing acq.distribution_formula_entry via Foreign Key Constraints\r
111                                                 </title>\r
112                                 \r
113                                                         <listitem>\r
114                                                                 <para><xref linkend="acq.table.distribution-formula-entry"/></para>\r
115                                                         </listitem>\r
116                                                         \r
117                                         </itemizedlist>\r
118                                 \r
119                                 \r
120                                 \r
121                                 \r
122                 </para>\r
123                 </simplesect>\r
124                 \r
125                 <simplesect id="acq.table.distribution-formula-entry" xreflabel="acq.distribution_formula_entry">               \r
126                         <title>distribution_formula_entry</title>\r
127                         <informaltable>\r
128                                 <tgroup cols="3">\r
129                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
130                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
131                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
132                                         <thead>\r
133                                                 <row>\r
134                                                         <entry>Field</entry>\r
135                                                         <entry>Data Type</entry>\r
136                                                         <entry>Constraints and References</entry>\r
137                                                 </row>\r
138                                                 </thead>\r
139                                                 <tbody>\r
140                                                 \r
141                                                         <row>\r
142                                                                 <entry>id</entry>\r
143                                                                 <entry>serial</entry>\r
144                                                                 <entry>PRIMARY KEY</entry>\r
145                                                         </row>\r
146                                                 \r
147                                                         <row>\r
148                                                                 <entry>formula</entry>\r
149                                                                 <entry>integer</entry>\r
150                                                                 <entry>UNIQUE#1; NOT NULL; <xref linkend="acq.table.distribution-formula"/></entry>\r
151                                                         </row>\r
152                                                 \r
153                                                         <row>\r
154                                                                 <entry>position</entry>\r
155                                                                 <entry>integer</entry>\r
156                                                                 <entry>UNIQUE#1; NOT NULL;</entry>\r
157                                                         </row>\r
158                                                 \r
159                                                         <row>\r
160                                                                 <entry>item_count</entry>\r
161                                                                 <entry>integer</entry>\r
162                                                                 <entry>NOT NULL;</entry>\r
163                                                         </row>\r
164                                                 \r
165                                                         <row>\r
166                                                                 <entry>owning_lib</entry>\r
167                                                                 <entry>integer</entry>\r
168                                                                 <entry><xref linkend="actor.table.org-unit"/></entry>\r
169                                                         </row>\r
170                                                 \r
171                                                         <row>\r
172                                                                 <entry>location</entry>\r
173                                                                 <entry>integer</entry>\r
174                                                                 <entry><xref linkend="asset.table.copy-location"/></entry>\r
175                                                         </row>\r
176                                                 \r
177                                                 </tbody>\r
178                                         </tgroup>\r
179                                 </informaltable>\r
180                                 <para>\r
181                                 \r
182                                 \r
183                                         <variablelist>\r
184                                                 <title>Constraints on distribution_formula_entry</title>\r
185                                                 \r
186                                                 <varlistentry>\r
187                                                         <term>acqdfe_must_ be_somewhere</term>\r
188                                                         <listitem><para>CHECK (((owning_lib IS NOT NULL) OR (location IS NOT NULL)))</para></listitem>\r
189                                                 </varlistentry>\r
190                                                 \r
191                                         </variablelist>\r
192                                 \r
193                                 \r
194                                 \r
195                                 \r
196                                 \r
197                 </para>\r
198                 </simplesect>\r
199                 \r
200                 <simplesect id="acq.table.exchange-rate" xreflabel="acq.exchange_rate">         \r
201                         <title>exchange_rate</title>\r
202                         <informaltable>\r
203                                 <tgroup cols="3">\r
204                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
205                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
206                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
207                                         <thead>\r
208                                                 <row>\r
209                                                         <entry>Field</entry>\r
210                                                         <entry>Data Type</entry>\r
211                                                         <entry>Constraints and References</entry>\r
212                                                 </row>\r
213                                                 </thead>\r
214                                                 <tbody>\r
215                                                 \r
216                                                         <row>\r
217                                                                 <entry>id</entry>\r
218                                                                 <entry>serial</entry>\r
219                                                                 <entry>PRIMARY KEY</entry>\r
220                                                         </row>\r
221                                                 \r
222                                                         <row>\r
223                                                                 <entry>from_currency</entry>\r
224                                                                 <entry>text</entry>\r
225                                                                 <entry>UNIQUE#1; NOT NULL; <xref linkend="acq.table.currency-type"/>\r
226                                                                                 \r
227                                                                         \r
228                                                                                 \r
229                                                                         \r
230                                                                         </entry>\r
231                                                         </row>\r
232                                                 \r
233                                                         <row>\r
234                                                                 <entry>to_currency</entry>\r
235                                                                 <entry>text</entry>\r
236                                                                 <entry>UNIQUE#1; NOT NULL; <xref linkend="acq.table.currency-type"/></entry>\r
237                                                         </row>\r
238                                                 \r
239                                                         <row>\r
240                                                                 <entry>ratio</entry>\r
241                                                                 <entry>numeric</entry>\r
242                                                                 <entry>NOT NULL;</entry>\r
243                                                         </row>\r
244                                                 \r
245                                                 </tbody>\r
246                                         </tgroup>\r
247                                 </informaltable>\r
248                                 <para>\r
249                                 \r
250                                 \r
251                                 \r
252                                 \r
253                 </para>\r
254                 </simplesect>\r
255                 \r
256                 <simplesect id="acq.table.fiscal-calendar" xreflabel="acq.fiscal_calendar">             \r
257                         <title>fiscal_calendar</title>\r
258                         <informaltable>\r
259                                 <tgroup cols="3">\r
260                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
261                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
262                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
263                                         <thead>\r
264                                                 <row>\r
265                                                         <entry>Field</entry>\r
266                                                         <entry>Data Type</entry>\r
267                                                         <entry>Constraints and References</entry>\r
268                                                 </row>\r
269                                                 </thead>\r
270                                                 <tbody>\r
271                                                 \r
272                                                         <row>\r
273                                                                 <entry>id</entry>\r
274                                                                 <entry>serial</entry>\r
275                                                                 <entry>PRIMARY KEY</entry>\r
276                                                         </row>\r
277                                                 \r
278                                                         <row>\r
279                                                                 <entry>name</entry>\r
280                                                                 <entry>text</entry>\r
281                                                                 <entry>NOT NULL;</entry>\r
282                                                         </row>\r
283                                                 \r
284                                                 </tbody>\r
285                                         </tgroup>\r
286                                 </informaltable>\r
287                                 <para>\r
288                                 \r
289                                 \r
290                                 \r
291                                         <itemizedlist>\r
292                                                 <title>\r
293                                                         Tables referencing acq.fiscal_year via Foreign Key Constraints\r
294                                                 </title>\r
295                                 \r
296                                                         <listitem>\r
297                                                                 <para><xref linkend="acq.table.fiscal-year"/></para>\r
298                                                         </listitem>\r
299                                                         \r
300                                         </itemizedlist>\r
301                                 \r
302                                 \r
303                                 \r
304                                 \r
305                 </para>\r
306                 </simplesect>\r
307                 \r
308                 <simplesect id="acq.table.fiscal-year" xreflabel="acq.fiscal_year">             \r
309                         <title>fiscal_year</title>\r
310                         <informaltable>\r
311                                 <tgroup cols="3">\r
312                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
313                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
314                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
315                                         <thead>\r
316                                                 <row>\r
317                                                         <entry>Field</entry>\r
318                                                         <entry>Data Type</entry>\r
319                                                         <entry>Constraints and References</entry>\r
320                                                 </row>\r
321                                                 </thead>\r
322                                                 <tbody>\r
323                                                 \r
324                                                         <row>\r
325                                                                 <entry>id</entry>\r
326                                                                 <entry>serial</entry>\r
327                                                                 <entry>PRIMARY KEY</entry>\r
328                                                         </row>\r
329                                                 \r
330                                                         <row>\r
331                                                                 <entry>calendar</entry>\r
332                                                                 <entry>integer</entry>\r
333                                                                 <entry>UNIQUE#1 ;UNIQUE#2; NOT NULL;\r
334                                                                 <xref linkend="acq.table.fiscal-calendar"/></entry>\r
335                                                         </row>\r
336                                                 \r
337                                                         <row>\r
338                                                                 <entry>year</entry>\r
339                                                                 <entry>integer</entry>\r
340                                                                 <entry>UNIQUE#1; NOT NULL; </entry>\r
341                                                         </row>\r
342                                                 \r
343                                                         <row>\r
344                                                                 <entry>year_begin</entry>\r
345                                                                 <entry>timestamp with time zone</entry>\r
346                                                                 <entry>UNIQUE#2; NOT NULL;</entry>\r
347                                                         </row>\r
348                                                 \r
349                                                         <row>\r
350                                                                 <entry>year_end</entry>\r
351                                                                 <entry>timestamp with time zone</entry>\r
352                                                                 <entry>NOT NULL;</entry>\r
353                                                         </row>\r
354                                                 \r
355                                                 </tbody>\r
356                                         </tgroup>\r
357                                 </informaltable>\r
358                                 <para>\r
359                                 \r
360                                 \r
361                                 \r
362                                 \r
363                 </para>\r
364                 </simplesect>\r
365                 \r
366                 <simplesect id="acq.table.fund" xreflabel="acq.fund">           \r
367                         <title>fund</title>\r
368                         <informaltable>\r
369                                 <tgroup cols="3">\r
370                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
371                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
372                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
373                                         <thead>\r
374                                                 <row>\r
375                                                         <entry>Field</entry>\r
376                                                         <entry>Data Type</entry>\r
377                                                         <entry>Constraints and References</entry>\r
378                                                 </row>\r
379                                                 </thead>\r
380                                                 <tbody>\r
381                                                 \r
382                                                         <row>\r
383                                                                 <entry>id</entry>\r
384                                                                 <entry>serial</entry>\r
385                                                                 <entry>PRIMARY KEY</entry>\r
386                                                         </row>\r
387                                                 \r
388                                                         <row>\r
389                                                                 <entry>org</entry>\r
390                                                                 <entry>integer</entry>\r
391                                                                 <entry>UNIQUE#2; UNIQUE#1; NOT NULL; <xref linkend="actor.table.org-unit"/></entry>\r
392                                                         </row>\r
393                                                 \r
394                                                         <row>\r
395                                                                 <entry>name</entry>\r
396                                                                 <entry>text</entry>\r
397                                                                 <entry>UNIQUE#1; NOT NULL;</entry>\r
398                                                         </row>\r
399                                                 \r
400                                                         <row>\r
401                                                                 <entry>year</entry>\r
402                                                                 <entry>integer</entry>\r
403                                                                 <entry>UNIQUE#2; UNIQUE#1; NOT NULL; DEFAULT date_part( &apos;year&apos;::text, now() );</entry>\r
404                                                         </row>\r
405                                                 \r
406                                                         <row>\r
407                                                                 <entry>currency_type</entry>\r
408                                                                 <entry>text</entry>\r
409                                                                 <entry>NOT NULL; <xref linkend="acq.table.currency-type"/> </entry>\r
410                                                         </row>\r
411                                                 \r
412                                                         <row>\r
413                                                                 <entry>code</entry>\r
414                                                                 <entry>text</entry>\r
415                                                                 <entry>UNIQUE#2;</entry>\r
416                                                         </row>\r
417                                                 \r
418                                                 </tbody>\r
419                                         </tgroup>\r
420                                 </informaltable>\r
421                                 <para>\r
422                                 \r
423                                 \r
424                                 \r
425                                         <itemizedlist>\r
426                                                 <title>\r
427                                                         Tables referencing acq.fund_allocation via Foreign Key Constraints\r
428                                                 </title>\r
429                                 \r
430                                                         <listitem>\r
431                                                                 <para><xref linkend="acq.table.fund-allocation"/></para>\r
432                                                         </listitem>\r
433                                                         \r
434                                 \r
435                                 \r
436                                                         <listitem>\r
437                                                                 <para><xref linkend="acq.table.fund-debit"/></para>\r
438                                                         </listitem>\r
439                                                         \r
440                                 \r
441                                 \r
442                                                         <listitem>\r
443                                                                 <para><xref linkend="acq.table.fund-tag-map"/></para>\r
444                                                         </listitem>\r
445                                                         \r
446                                 \r
447                                 \r
448                                                         <listitem>\r
449                                                                 <para><xref linkend="acq.table.lineitem-detail"/></para>\r
450                                                         </listitem>\r
451                                                         \r
452                                         </itemizedlist>\r
453                                 \r
454                                 \r
455                                 \r
456                                 \r
457                 </para>\r
458                 </simplesect>\r
459                 \r
460                 <simplesect id="acq.table.fund-allocation" xreflabel="acq.fund_allocation">             \r
461                         <title>fund_allocation</title>\r
462                         <informaltable>\r
463                                 <tgroup cols="3">\r
464                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
465                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
466                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
467                                         <thead>\r
468                                                 <row>\r
469                                                         <entry>Field</entry>\r
470                                                         <entry>Data Type</entry>\r
471                                                         <entry>Constraints and References</entry>\r
472                                                 </row>\r
473                                                 </thead>\r
474                                                 <tbody>\r
475                                                 \r
476                                                         <row>\r
477                                                                 <entry>id</entry>\r
478                                                                 <entry>serial</entry>\r
479                                                                 <entry>PRIMARY KEY</entry>\r
480                                                         </row>\r
481                                                 \r
482                                                         <row>\r
483                                                                 <entry>funding_source</entry>\r
484                                                                 <entry>integer</entry>\r
485                                                                 <entry>NOT NULL; <xref linkend="acq.table.funding-source"/></entry>\r
486                                                         </row>\r
487                                                 \r
488                                                         <row>\r
489                                                                 <entry>fund</entry>\r
490                                                                 <entry>integer</entry>\r
491                                                                 <entry>NOT NULL; <xref linkend="acq.table.fund"/></entry>\r
492                                                         </row>\r
493                                                 \r
494                                                         <row>\r
495                                                                 <entry>amount</entry>\r
496                                                                 <entry>numeric</entry>\r
497                                                                 <entry></entry>\r
498                                                         </row>\r
499                                                 \r
500                                                         <row>\r
501                                                                 <entry>percent</entry>\r
502                                                                 <entry>numeric</entry>\r
503                                                                 <entry></entry>\r
504                                                         </row>\r
505                                                 \r
506                                                         <row>\r
507                                                                 <entry>allocator</entry>\r
508                                                                 <entry>integer</entry>\r
509                                                                 <entry>NOT NULL; <xref linkend="actor.table.usr"/></entry>\r
510                                                         </row>\r
511                                                 \r
512                                                         <row>\r
513                                                                 <entry>note</entry>\r
514                                                                 <entry>text</entry>\r
515                                                                 <entry></entry>\r
516                                                         </row>\r
517                                                 \r
518                                                         <row>\r
519                                                                 <entry>create_time</entry>\r
520                                                                 <entry>timestamp with time zone</entry>\r
521                                                                 <entry>NOT NULL; DEFAULT now(); </entry>\r
522                                                         </row>\r
523                                                 \r
524                                                 </tbody>\r
525                                         </tgroup>\r
526                                 </informaltable>\r
527                                 <para>\r
528                                 \r
529                                 \r
530                                         <variablelist>\r
531                                                 <title>Constraints on fund_allocation</title>\r
532                                                 \r
533                                                 <varlistentry>\r
534                                                         <term>allocation_amount _or_percent</term>\r
535                                                         <listitem><para>CHECK ((((percent IS NULL) AND (amount IS NOT NULL)) OR ((percent IS NOT NULL) AND (amount IS NULL))))</para></listitem>\r
536                                                 </varlistentry>\r
537                                                 \r
538                                 \r
539                                 \r
540                                                 <varlistentry>\r
541                                                         <term>fund_allocation_ percent_check</term>\r
542                                                         <listitem><para>CHECK (((percent IS NULL) OR ((percent &gt;= 0.0) AND (percent &lt;= 100.0))))</para></listitem>\r
543                                                 </varlistentry>\r
544                                                 \r
545                                         </variablelist>\r
546                                 \r
547                                 \r
548                                 \r
549                                 \r
550                                 \r
551                 </para>\r
552                 </simplesect>\r
553                 \r
554                 <simplesect id="acq.view.fund-allocation-total" xreflabel="acq.fund_allocation_total">          \r
555                         <title>fund_allocation_total</title>\r
556                         <informaltable>\r
557                                 <tgroup cols="3">\r
558                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
559                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
560                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
561                                         <thead>\r
562                                                 <row>\r
563                                                         <entry>Field</entry>\r
564                                                         <entry>Data Type</entry>\r
565                                                         <entry>Constraints and References</entry>\r
566                                                 </row>\r
567                                                 </thead>\r
568                                                 <tbody>\r
569                                                 \r
570                                                         <row>\r
571                                                                 <entry>fund</entry>\r
572                                                                 <entry>integer</entry>\r
573                                                                 <entry>\r
574                                                                         \r
575                                                                         \r
576                                                                         \r
577                                                                         \r
578                                                                         </entry>\r
579                                                         </row>\r
580                                                 \r
581                                                         <row>\r
582                                                                 <entry>amount</entry>\r
583                                                                 <entry>numeric(100,2)</entry>\r
584                                                                 <entry></entry>\r
585                                                         </row>\r
586                                                 \r
587                                                 </tbody>\r
588                                         </tgroup>\r
589                                 </informaltable>\r
590                                 <para>\r
591                                 \r
592                                 \r
593                                 \r
594                                 \r
595                 </para>\r
596                 </simplesect>\r
597                 \r
598                 <simplesect id="acq.view.fund-combined-balance" xreflabel="acq.fund_combined_balance">          \r
599                         <title>fund_combined_balance</title>\r
600                         <informaltable>\r
601                                 <tgroup cols="3">\r
602                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
603                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
604                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
605                                         <thead>\r
606                                                 <row>\r
607                                                         <entry>Field</entry>\r
608                                                         <entry>Data Type</entry>\r
609                                                         <entry>Constraints and References</entry>\r
610                                                 </row>\r
611                                                 </thead>\r
612                                                 <tbody>\r
613                                                 \r
614                                                         <row>\r
615                                                                 <entry>fund</entry>\r
616                                                                 <entry>integer</entry>\r
617                                                                 <entry></entry>\r
618                                                         </row>\r
619                                                 \r
620                                                         <row>\r
621                                                                 <entry>amount</entry>\r
622                                                                 <entry>numeric</entry>\r
623                                                                 <entry></entry>\r
624                                                         </row>\r
625                                                 \r
626                                                 </tbody>\r
627                                         </tgroup>\r
628                                 </informaltable>\r
629                                 <para>\r
630                                 \r
631                                 \r
632                                 \r
633                                 \r
634                 </para>\r
635                 </simplesect>\r
636                 \r
637                 <simplesect id="acq.table.fund-debit" xreflabel="acq.fund_debit">               \r
638                         <title>fund_debit</title>\r
639                         <informaltable>\r
640                                 <tgroup cols="3">\r
641                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
642                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
643                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
644                                         <thead>\r
645                                                 <row>\r
646                                                         <entry>Field</entry>\r
647                                                         <entry>Data Type</entry>\r
648                                                         <entry>Constraints and References</entry>\r
649                                                 </row>\r
650                                                 </thead>\r
651                                                 <tbody>\r
652                                                 \r
653                                                         <row>\r
654                                                                 <entry>id</entry>\r
655                                                                 <entry>serial</entry>\r
656                                                                 <entry>PRIMARY KEY</entry>\r
657                                                         </row>\r
658                                                 \r
659                                                         <row>\r
660                                                                 <entry>fund</entry>\r
661                                                                 <entry>integer</entry>\r
662                                                                 <entry>NOT NULL; <xref linkend="acq.table.fund"/></entry>\r
663                                                         </row>\r
664                                                 \r
665                                                         <row>\r
666                                                                 <entry>origin_amount</entry>\r
667                                                                 <entry>numeric</entry>\r
668                                                                 <entry>NOT NULL;</entry>\r
669                                                         </row>\r
670                                                 \r
671                                                         <row>\r
672                                                                 <entry>origin_currency_type</entry>\r
673                                                                 <entry>text</entry>\r
674                                                                 <entry>NOT NULL; <xref linkend="acq.table.currency-type"/> </entry>\r
675                                                         </row>\r
676                                                 \r
677                                                         <row>\r
678                                                                 <entry>amount</entry>\r
679                                                                 <entry>numeric</entry>\r
680                                                                 <entry>NOT NULL;</entry>\r
681                                                         </row>\r
682                                                 \r
683                                                         <row>\r
684                                                                 <entry>encumbrance</entry>\r
685                                                                 <entry>boolean</entry>\r
686                                                                 <entry>NOT NULL; DEFAULT true;</entry>\r
687                                                         </row>\r
688                                                 \r
689                                                         <row>\r
690                                                                 <entry>debit_type</entry>\r
691                                                                 <entry>text</entry>\r
692                                                                 <entry>NOT NULL;</entry>\r
693                                                         </row>\r
694                                                 \r
695                                                         <row>\r
696                                                                 <entry>xfer_destination</entry>\r
697                                                                 <entry>integer</entry>\r
698                                                                 <entry><xref linkend="acq.table.fund"/></entry>\r
699                                                         </row>\r
700                                                 \r
701                                                         <row>\r
702                                                                 <entry>create_time</entry>\r
703                                                                 <entry>timestamp with time zone</entry>\r
704                                                                 <entry>NOT NULL; DEFAULT now();</entry>\r
705                                                         </row>\r
706                                                 \r
707                                                 </tbody>\r
708                                         </tgroup>\r
709                                 </informaltable>\r
710                                 <para>\r
711                                 \r
712                                 \r
713                                 \r
714                                         <itemizedlist>\r
715                                                 <title>\r
716                                                         Tables referencing acq.lineitem_detail via Foreign Key Constraints\r
717                                                 </title>\r
718                                 \r
719                                                         <listitem>\r
720                                                                 <para><xref linkend="acq.table.lineitem-detail"/></para>\r
721                                                         </listitem>\r
722                                                         \r
723                                         </itemizedlist>\r
724                                 \r
725                                 \r
726                                 \r
727                                 \r
728                 </para>\r
729                 </simplesect>\r
730                 \r
731                 <simplesect id="acq.view.fund-debit-total" xreflabel="acq.fund_debit_total">            \r
732                         <title>fund_debit_total</title>\r
733                         <informaltable>\r
734                                 <tgroup cols="3">\r
735                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
736                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
737                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
738                                         <thead>\r
739                                                 <row>\r
740                                                         <entry>Field</entry>\r
741                                                         <entry>Data Type</entry>\r
742                                                         <entry>Constraints and References</entry>\r
743                                                 </row>\r
744                                                 </thead>\r
745                                                 <tbody>\r
746                                                 \r
747                                                         <row>\r
748                                                                 <entry>fund</entry>\r
749                                                                 <entry>integer</entry>\r
750                                                                 <entry></entry>\r
751                                                         </row>\r
752                                                 \r
753                                                         <row>\r
754                                                                 <entry>encumbrance</entry>\r
755                                                                 <entry>boolean</entry>\r
756                                                                 <entry></entry>\r
757                                                         </row>\r
758                                                 \r
759                                                         <row>\r
760                                                                 <entry>amount</entry>\r
761                                                                 <entry>numeric</entry>\r
762                                                                 <entry></entry>\r
763                                                         </row>\r
764                                                 \r
765                                                 </tbody>\r
766                                         </tgroup>\r
767                                 </informaltable>\r
768                                 <para>\r
769                                 \r
770                                 \r
771                                 \r
772                                 \r
773                 </para>\r
774                 </simplesect>\r
775                 \r
776                 <simplesect id="acq.view.fund-encumbrance-total" xreflabel="acq.fund_encumbrance_total">                \r
777                         <title>fund_encumbrance_total</title>\r
778                         <informaltable>\r
779                                 <tgroup cols="3">\r
780                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
781                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
782                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
783                                         <thead>\r
784                                                 <row>\r
785                                                         <entry>Field</entry>\r
786                                                         <entry>Data Type</entry>\r
787                                                         <entry>Constraints and References</entry>\r
788                                                 </row>\r
789                                                 </thead>\r
790                                                 <tbody>\r
791                                                 \r
792                                                         <row>\r
793                                                                 <entry>fund</entry>\r
794                                                                 <entry>integer</entry>\r
795                                                                 <entry></entry>\r
796                                                         </row>\r
797                                                 \r
798                                                         <row>\r
799                                                                 <entry>amount</entry>\r
800                                                                 <entry>numeric</entry>\r
801                                                                 <entry></entry>\r
802                                                         </row>\r
803                                                 \r
804                                                 </tbody>\r
805                                         </tgroup>\r
806                                 </informaltable>\r
807                                 <para>\r
808                                 \r
809                                 \r
810                                 \r
811                                 \r
812                 </para>\r
813                 </simplesect>\r
814                 \r
815                 <simplesect id="acq.view.fund-spent-balance" xreflabel="acq.fund_spent_balance">                \r
816                         <title>fund_spent_balance</title>\r
817                         <informaltable>\r
818                                 <tgroup cols="3">\r
819                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
820                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
821                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
822                                         <thead>\r
823                                                 <row>\r
824                                                         <entry>Field</entry>\r
825                                                         <entry>Data Type</entry>\r
826                                                         <entry>Constraints and References</entry>\r
827                                                 </row>\r
828                                                 </thead>\r
829                                                 <tbody>\r
830                                                 \r
831                                                         <row>\r
832                                                                 <entry>fund</entry>\r
833                                                                 <entry>integer</entry>\r
834                                                                 <entry></entry>\r
835                                                         </row>\r
836                                                 \r
837                                                         <row>\r
838                                                                 <entry>amount</entry>\r
839                                                                 <entry>numeric</entry>\r
840                                                                 <entry></entry>\r
841                                                         </row>\r
842                                                 \r
843                                                 </tbody>\r
844                                         </tgroup>\r
845                                 </informaltable>\r
846                                 <para>\r
847                                 \r
848                                 \r
849                                 \r
850                                 \r
851                 </para>\r
852                 </simplesect>\r
853                 \r
854                 <simplesect id="acq.view.fund-spent-total" xreflabel="acq.fund_spent_total">            \r
855                         <title>fund_spent_total</title>\r
856                         <informaltable>\r
857                                 <tgroup cols="3">\r
858                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
859                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
860                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
861                                         <thead>\r
862                                                 <row>\r
863                                                         <entry>Field</entry>\r
864                                                         <entry>Data Type</entry>\r
865                                                         <entry>Constraints and References</entry>\r
866                                                 </row>\r
867                                                 </thead>\r
868                                                 <tbody>\r
869                                                 \r
870                                                         <row>\r
871                                                                 <entry>fund</entry>\r
872                                                                 <entry>integer</entry>\r
873                                                                 <entry></entry>\r
874                                                         </row>\r
875                                                 \r
876                                                         <row>\r
877                                                                 <entry>amount</entry>\r
878                                                                 <entry>numeric</entry>\r
879                                                                 <entry></entry>\r
880                                                         </row>\r
881                                                 \r
882                                                 </tbody>\r
883                                         </tgroup>\r
884                                 </informaltable>\r
885                                 <para>\r
886                                 \r
887                                 \r
888                                 \r
889                                 \r
890                 </para>\r
891                 </simplesect>\r
892                 \r
893                 <simplesect id="acq.table.fund-tag" xreflabel="acq.fund_tag">           \r
894                         <title>fund_tag</title>\r
895                         <informaltable>\r
896                                 <tgroup cols="3">\r
897                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
898                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
899                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
900                                         <thead>\r
901                                                 <row>\r
902                                                         <entry>Field</entry>\r
903                                                         <entry>Data Type</entry>\r
904                                                         <entry>Constraints and References</entry>\r
905                                                 </row>\r
906                                                 </thead>\r
907                                                 <tbody>\r
908                                                 \r
909                                                         <row>\r
910                                                                 <entry>id</entry>\r
911                                                                 <entry>serial</entry>\r
912                                                                 <entry>PRIMARY KEY</entry>\r
913                                                         </row>\r
914                                                 \r
915                                                         <row>\r
916                                                                 <entry>owner</entry>\r
917                                                                 <entry>integer</entry>\r
918                                                                 <entry>UNIQUE#1; NOT NULL; <xref linkend="actor.table.org-unit"/></entry>\r
919                                                         </row>\r
920                                                 \r
921                                                         <row>\r
922                                                                 <entry>name</entry>\r
923                                                                 <entry>text</entry>\r
924                                                                 <entry>UNIQUE#1; NOT NULL;</entry>\r
925                                                         </row>\r
926                                                 \r
927                                                 </tbody>\r
928                                         </tgroup>\r
929                                 </informaltable>\r
930                                 <para>\r
931                                 \r
932                                 \r
933                                 \r
934                                         <itemizedlist>\r
935                                                 <title>\r
936                                                         Tables referencing acq.fund_tag_map via Foreign Key Constraints\r
937                                                 </title>\r
938                                 \r
939                                                         <listitem>\r
940                                                                 <para><xref linkend="acq.table.fund-tag-map"/></para>\r
941                                                         </listitem>\r
942                                                         \r
943                                         </itemizedlist>\r
944                                 \r
945                                 \r
946                                 \r
947                                 \r
948                 </para>\r
949                 </simplesect>\r
950                 \r
951                 <simplesect id="acq.table.fund-tag-map" xreflabel="acq.fund_tag_map">           \r
952                         <title>fund_tag_map</title>\r
953                         <informaltable>\r
954                                 <tgroup cols="3">\r
955                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
956                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
957                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
958                                         <thead>\r
959                                                 <row>\r
960                                                         <entry>Field</entry>\r
961                                                         <entry>Data Type</entry>\r
962                                                         <entry>Constraints and References</entry>\r
963                                                 </row>\r
964                                                 </thead>\r
965                                                 <tbody>\r
966                                                 \r
967                                                         <row>\r
968                                                                 <entry>id</entry>\r
969                                                                 <entry>serial</entry>\r
970                                                                 <entry>PRIMARY KEY</entry>\r
971                                                         </row>\r
972                                                 \r
973                                                         <row>\r
974                                                                 <entry>fund</entry>\r
975                                                                 <entry>integer</entry>\r
976                                                                 <entry>UNIQUE#1; NOT NULL; <xref linkend="acq.table.fund"/></entry>\r
977                                                         </row>\r
978                                                 \r
979                                                         <row>\r
980                                                                 <entry>tag</entry>\r
981                                                                 <entry>integer</entry>\r
982                                                                 <entry>UNIQUE#1; <xref linkend="acq.table.fund-tag"/></entry>\r
983                                                         </row>\r
984                                                 \r
985                                                 </tbody>\r
986                                         </tgroup>\r
987                                 </informaltable>\r
988                                 <para>\r
989                                 \r
990                                 \r
991                                 \r
992                                 \r
993                 </para>\r
994                 </simplesect>\r
995                 \r
996                 <simplesect id="acq.table.funding-source" xreflabel="acq.funding_source">               \r
997                         <title>funding_source</title>\r
998                         <informaltable>\r
999                                 <tgroup cols="3">\r
1000                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
1001                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
1002                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
1003                                         <thead>\r
1004                                                 <row>\r
1005                                                         <entry>Field</entry>\r
1006                                                         <entry>Data Type</entry>\r
1007                                                         <entry>Constraints and References</entry>\r
1008                                                 </row>\r
1009                                                 </thead>\r
1010                                                 <tbody>\r
1011                                                 \r
1012                                                         <row>\r
1013                                                                 <entry>id</entry>\r
1014                                                                 <entry>serial</entry>\r
1015                                                                 <entry>PRIMARY KEY</entry>\r
1016                                                         </row>\r
1017                                                 \r
1018                                                         <row>\r
1019                                                                 <entry>name</entry>\r
1020                                                                 <entry>text</entry>\r
1021                                                                 <entry>UNIQUE#1; NOT NULL;</entry>\r
1022                                                         </row>\r
1023                                                 \r
1024                                                         <row>\r
1025                                                                 <entry>owner</entry>\r
1026                                                                 <entry>integer</entry>\r
1027                                                                 <entry>UNIQUE#1; NOT NULL; <xref linkend="actor.table.org-unit"/></entry>\r
1028                                                         </row>\r
1029                                                 \r
1030                                                         <row>\r
1031                                                                 <entry>currency_type</entry>\r
1032                                                                 <entry>text</entry>\r
1033                                                                 <entry>NOT NULL; <xref linkend="acq.table.currency-type"/></entry>\r
1034                                                         </row>\r
1035                                                 \r
1036                                                         <row>\r
1037                                                                 <entry>code</entry>\r
1038                                                                 <entry>text</entry>\r
1039                                                                 <entry>UNIQUE;</entry>\r
1040                                                         </row>\r
1041                                                 \r
1042                                                 </tbody>\r
1043                                         </tgroup>\r
1044                                 </informaltable>\r
1045                                 <para>\r
1046                                 \r
1047                                 \r
1048                                 \r
1049                                         <itemizedlist>\r
1050                                                 <title>\r
1051                                                         Tables referencing acq.fund_allocation via Foreign Key Constraints\r
1052                                                 </title>\r
1053                                 \r
1054                                                         <listitem>\r
1055                                                                 <para><xref linkend="acq.table.fund-allocation"/></para>\r
1056                                                         </listitem>\r
1057                                                         \r
1058                                 \r
1059                                 \r
1060                                                         <listitem>\r
1061                                                                 <para><xref linkend="acq.table.funding-source-credit"/></para>\r
1062                                                         </listitem>\r
1063                                                         \r
1064                                         </itemizedlist>\r
1065                                 \r
1066                                 \r
1067                                 \r
1068                                 \r
1069                 </para>\r
1070                 </simplesect>\r
1071                 \r
1072                 <simplesect id="acq.view.funding-source-allocation-total" xreflabel="acq.funding_source_allocation_total">              \r
1073                         <title>funding_source_allocation_total</title>\r
1074                         <informaltable>\r
1075                                 <tgroup cols="3">\r
1076                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
1077                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
1078                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
1079                                         <thead>\r
1080                                                 <row>\r
1081                                                         <entry>Field</entry>\r
1082                                                         <entry>Data Type</entry>\r
1083                                                         <entry>Constraints and References</entry>\r
1084                                                 </row>\r
1085                                                 </thead>\r
1086                                                 <tbody>\r
1087                                                 \r
1088                                                         <row>\r
1089                                                                 <entry>funding_source</entry>\r
1090                                                                 <entry>integer</entry>\r
1091                                                                 <entry></entry>\r
1092                                                         </row>\r
1093                                                 \r
1094                                                         <row>\r
1095                                                                 <entry>amount</entry>\r
1096                                                                 <entry>numeric(100,2)</entry>\r
1097                                                                 <entry></entry>\r
1098                                                         </row>\r
1099                                                 \r
1100                                                 </tbody>\r
1101                                         </tgroup>\r
1102                                 </informaltable>\r
1103                                 <para>\r
1104                                 \r
1105                                 \r
1106                                 \r
1107                                 \r
1108                 </para>\r
1109                 </simplesect>\r
1110                 \r
1111                 <simplesect id="acq.view.funding-source-balance" xreflabel="acq.funding_source_balance">                \r
1112                         <title>funding_source_balance</title>\r
1113                         <informaltable>\r
1114                                 <tgroup cols="3">\r
1115                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
1116                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
1117                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
1118                                         <thead>\r
1119                                                 <row>\r
1120                                                         <entry>Field</entry>\r
1121                                                         <entry>Data Type</entry>\r
1122                                                         <entry>Constraints and References</entry>\r
1123                                                 </row>\r
1124                                                 </thead>\r
1125                                                 <tbody>\r
1126                                                 \r
1127                                                         <row>\r
1128                                                                 <entry>funding_source</entry>\r
1129                                                                 <entry>integer</entry>\r
1130                                                                 <entry>\r
1131                                                                         \r
1132                                                                         \r
1133                                                                         \r
1134                                                                         \r
1135                                                                         </entry>\r
1136                                                         </row>\r
1137                                                 \r
1138                                                         <row>\r
1139                                                                 <entry>amount</entry>\r
1140                                                                 <entry>numeric(100,2)</entry>\r
1141                                                                 <entry>\r
1142                                                                         \r
1143                                                                         \r
1144                                                                         \r
1145                                                                         \r
1146                                                                         </entry>\r
1147                                                         </row>\r
1148                                                 \r
1149                                                 </tbody>\r
1150                                         </tgroup>\r
1151                                 </informaltable>\r
1152                                 <para>\r
1153                                 \r
1154                                 \r
1155                                 \r
1156                                 \r
1157                 </para>\r
1158                 </simplesect>\r
1159                 \r
1160                 <simplesect id="acq.table.funding-source-credit" xreflabel="acq.funding_source_credit">         \r
1161                         <title>funding_source_credit</title>\r
1162                         <informaltable>\r
1163                                 <tgroup cols="3">\r
1164                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
1165                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
1166                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
1167                                         <thead>\r
1168                                                 <row>\r
1169                                                         <entry>Field</entry>\r
1170                                                         <entry>Data Type</entry>\r
1171                                                         <entry>Constraints and References</entry>\r
1172                                                 </row>\r
1173                                                 </thead>\r
1174                                                 <tbody>\r
1175                                                 \r
1176                                                         <row>\r
1177                                                                 <entry>id</entry>\r
1178                                                                 <entry>serial</entry>\r
1179                                                                 <entry>PRIMARY KEY</entry>\r
1180                                                         </row>\r
1181                                                 \r
1182                                                         <row>\r
1183                                                                 <entry>funding_source</entry>\r
1184                                                                 <entry>integer</entry>\r
1185                                                                 <entry>NOT NULL; <xref linkend="acq.table.funding-source"/></entry>\r
1186                                                         </row>\r
1187                                                 \r
1188                                                         <row>\r
1189                                                                 <entry>amount</entry>\r
1190                                                                 <entry>numeric</entry>\r
1191                                                                 <entry>NOT NULL;</entry>\r
1192                                                         </row>\r
1193                                                 \r
1194                                                         <row>\r
1195                                                                 <entry>note</entry>\r
1196                                                                 <entry>text</entry>\r
1197                                                                 <entry></entry>\r
1198                                                         </row>\r
1199                                                 \r
1200                                                 </tbody>\r
1201                                         </tgroup>\r
1202                                 </informaltable>\r
1203                                 <para>\r
1204                                 \r
1205                                 \r
1206                                 \r
1207                                 \r
1208                 </para>\r
1209                 </simplesect>\r
1210                 \r
1211                 <simplesect id="acq.view.funding-source-credit-total" xreflabel="acq.funding_source_credit_total">              \r
1212                         <title>funding_source_credit_total</title>\r
1213                         <informaltable>\r
1214                                 <tgroup cols="3">\r
1215                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
1216                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
1217                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
1218                                         <thead>\r
1219                                                 <row>\r
1220                                                         <entry>Field</entry>\r
1221                                                         <entry>Data Type</entry>\r
1222                                                         <entry>Constraints and References</entry>\r
1223                                                 </row>\r
1224                                                 </thead>\r
1225                                                 <tbody>\r
1226                                                 \r
1227                                                         <row>\r
1228                                                                 <entry>funding_source</entry>\r
1229                                                                 <entry>integer</entry>\r
1230                                                                 <entry></entry>\r
1231                                                         </row>\r
1232                                                 \r
1233                                                         <row>\r
1234                                                                 <entry>amount</entry>\r
1235                                                                 <entry>numeric</entry>\r
1236                                                                 <entry></entry>\r
1237                                                         </row>\r
1238                                                 \r
1239                                                 </tbody>\r
1240                                         </tgroup>\r
1241                                 </informaltable>\r
1242                                 <para>\r
1243                                 \r
1244                                 \r
1245                                 \r
1246                                 \r
1247                 </para>\r
1248                 </simplesect>\r
1249                 \r
1250                 <simplesect id="acq.table.lineitem" xreflabel="acq.lineitem">           \r
1251                         <title>lineitem</title>\r
1252                         <informaltable>\r
1253                                 <tgroup cols="3">\r
1254                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
1255                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
1256                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
1257                                         <thead>\r
1258                                                 <row>\r
1259                                                         <entry>Field</entry>\r
1260                                                         <entry>Data Type</entry>\r
1261                                                         <entry>Constraints and References</entry>\r
1262                                                 </row>\r
1263                                                 </thead>\r
1264                                                 <tbody>\r
1265                                                 \r
1266                                                         <row>\r
1267                                                                 <entry>id</entry>\r
1268                                                                 <entry>bigserial</entry>\r
1269                                                                 <entry>PRIMARY KEY</entry>\r
1270                                                         </row>\r
1271                                                 \r
1272                                                         <row>\r
1273                                                                 <entry>creator</entry>\r
1274                                                                 <entry>integer</entry>\r
1275                                                                 <entry>NOT NULL; <xref linkend="actor.table.usr"/></entry>\r
1276                                                         </row>\r
1277                                                 \r
1278                                                         <row>\r
1279                                                                 <entry>editor</entry>\r
1280                                                                 <entry>integer</entry>\r
1281                                                                 <entry>NOT NULL;<xref linkend="actor.table.usr"/></entry>\r
1282                                                         </row>\r
1283                                                 \r
1284                                                         <row>\r
1285                                                                 <entry>selector</entry>\r
1286                                                                 <entry>integer</entry>\r
1287                                                                 <entry>NOT NULL;<xref linkend="actor.table.usr"/></entry>\r
1288                                                         </row>\r
1289                                                 \r
1290                                                         <row>\r
1291                                                                 <entry>provider</entry>\r
1292                                                                 <entry>integer</entry>\r
1293                                                                 <entry><xref linkend="acq.table.provider"/></entry>\r
1294                                                         </row>\r
1295                                                 \r
1296                                                         <row>\r
1297                                                                 <entry>purchase_order</entry>\r
1298                                                                 <entry>integer</entry>\r
1299                                                                 <entry><xref linkend="acq.table.purchase-order"/></entry>\r
1300                                                         </row>\r
1301                                                 \r
1302                                                         <row>\r
1303                                                                 <entry>picklist</entry>\r
1304                                                                 <entry>integer</entry>\r
1305                                                                 <entry><xref linkend="acq.table.picklist"/></entry>\r
1306                                                         </row>\r
1307                                                 \r
1308                                                         <row>\r
1309                                                                 <entry>expected_recv_time</entry>\r
1310                                                                 <entry>timestamp with time zone</entry>\r
1311                                                                 <entry></entry>\r
1312                                                         </row>\r
1313                                                 \r
1314                                                         <row>\r
1315                                                                 <entry>create_time</entry>\r
1316                                                                 <entry>timestamp with time zone</entry>\r
1317                                                                 <entry>NOT NULL; DEFAULT now();</entry>\r
1318                                                         </row>\r
1319                                                 \r
1320                                                         <row>\r
1321                                                                 <entry>edit_time</entry>\r
1322                                                                 <entry>timestamp with time zone</entry>\r
1323                                                                 <entry>NOT NULL; DEFAULT now(); </entry>\r
1324                                                         </row>\r
1325                                                 \r
1326                                                         <row>\r
1327                                                                 <entry>marc</entry>\r
1328                                                                 <entry>text</entry>\r
1329                                                                 <entry>NOT NULL;</entry>\r
1330                                                         </row>\r
1331                                                 \r
1332                                                         <row>\r
1333                                                                 <entry>eg_bib_id</entry>\r
1334                                                                 <entry>integer</entry>\r
1335                                                                 <entry><xref linkend="biblio.table.record-entry"/></entry>\r
1336                                                         </row>\r
1337                                                 \r
1338                                                         <row>\r
1339                                                                 <entry>source_label</entry>\r
1340                                                                 <entry>text</entry>\r
1341                                                                 <entry></entry>\r
1342                                                         </row>\r
1343                                                 \r
1344                                                         <row>\r
1345                                                                 <entry>item_count</entry>\r
1346                                                                 <entry>integer</entry>\r
1347                                                                 <entry>NOT NULL;</entry>\r
1348                                                         </row>\r
1349                                                 \r
1350                                                         <row>\r
1351                                                                 <entry>state</entry>\r
1352                                                                 <entry>text</entry>\r
1353                                                                 <entry>NOT NULL;DEFAULT &apos;new&apos;::text;</entry>\r
1354                                                         </row>\r
1355                                                 \r
1356                                                 </tbody>\r
1357                                         </tgroup>\r
1358                                 </informaltable>\r
1359                                 <para>\r
1360                                 \r
1361                                 \r
1362                                         <variablelist>\r
1363                                                 <title>Constraints on lineitem</title>\r
1364                                                 \r
1365                                                 <varlistentry>\r
1366                                                         <term>picklist_or_po</term>\r
1367                                                         <listitem><para>CHECK (((picklist IS NOT NULL) OR (purchase_order IS NOT NULL)))</para></listitem>\r
1368                                                 </varlistentry>\r
1369                                                 \r
1370                                         </variablelist>\r
1371                                 \r
1372                                 \r
1373                                 \r
1374                                 \r
1375                                         <itemizedlist>\r
1376                                                 <title>\r
1377                                                         Tables referencing acq.lineitem_attr via Foreign Key Constraints\r
1378                                                 </title>\r
1379                                 \r
1380                                                         <listitem>\r
1381                                                                 <para><xref linkend="acq.table.lineitem-attr"/></para>\r
1382                                                         </listitem>\r
1383                                                         \r
1384                                 \r
1385                                 \r
1386                                                         <listitem>\r
1387                                                                 <para><xref linkend="acq.table.lineitem-detail"/></para>\r
1388                                                         </listitem>\r
1389                                                         \r
1390                                 \r
1391                                 \r
1392                                                         <listitem>\r
1393                                                                 <para><xref linkend="acq.table.lineitem-note"/></para>\r
1394                                                         </listitem>\r
1395                                                         \r
1396                                         </itemizedlist>\r
1397                                 \r
1398                                 \r
1399                                 \r
1400                                 \r
1401                 </para>\r
1402                 </simplesect>\r
1403                 \r
1404                 <simplesect id="acq.table.lineitem-attr" xreflabel="acq.lineitem_attr">         \r
1405                         <title>lineitem_attr</title>\r
1406                         <informaltable>\r
1407                                 <tgroup cols="3">\r
1408                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
1409                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
1410                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
1411                                         <thead>\r
1412                                                 <row>\r
1413                                                         <entry>Field</entry>\r
1414                                                         <entry>Data Type</entry>\r
1415                                                         <entry>Constraints and References</entry>\r
1416                                                 </row>\r
1417                                                 </thead>\r
1418                                                 <tbody>\r
1419                                                 \r
1420                                                         <row>\r
1421                                                                 <entry>id</entry>\r
1422                                                                 <entry>bigserial</entry>\r
1423                                                                 <entry>PRIMARY KEY</entry>\r
1424                                                         </row>\r
1425                                                 \r
1426                                                         <row>\r
1427                                                                 <entry>definition</entry>\r
1428                                                                 <entry>bigint</entry>\r
1429                                                                 <entry>NOT NULL;</entry>\r
1430                                                         </row>\r
1431                                                 \r
1432                                                         <row>\r
1433                                                                 <entry>lineitem</entry>\r
1434                                                                 <entry>bigint</entry>\r
1435                                                                 <entry>NOT NULL;<xref linkend="acq.table.lineitem"/></entry>\r
1436                                                         </row>\r
1437                                                 \r
1438                                                         <row>\r
1439                                                                 <entry>attr_type</entry>\r
1440                                                                 <entry>text</entry>\r
1441                                                                 <entry>NOT NULL;</entry>\r
1442                                                         </row>\r
1443                                                 \r
1444                                                         <row>\r
1445                                                                 <entry>attr_name</entry>\r
1446                                                                 <entry>text</entry>\r
1447                                                                 <entry>NOT NULL;</entry>\r
1448                                                         </row>\r
1449                                                 \r
1450                                                         <row>\r
1451                                                                 <entry>attr_value</entry>\r
1452                                                                 <entry>text</entry>\r
1453                                                                 <entry>NOT NULL;</entry>\r
1454                                                         </row>\r
1455                                                 \r
1456                                                 </tbody>\r
1457                                         </tgroup>\r
1458                                 </informaltable>\r
1459                                 <para>\r
1460                                 \r
1461                                 \r
1462                                 \r
1463                                 \r
1464                 </para>\r
1465                 </simplesect>\r
1466                 \r
1467                 <simplesect id="acq.table.lineitem-attr-definition" xreflabel="acq.lineitem_attr_definition">           \r
1468                         <title>lineitem_attr_definition</title>\r
1469                         <informaltable>\r
1470                                 <tgroup cols="3">\r
1471                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
1472                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
1473                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
1474                                         <thead>\r
1475                                                 <row>\r
1476                                                         <entry>Field</entry>\r
1477                                                         <entry>Data Type</entry>\r
1478                                                         <entry>Constraints and References</entry>\r
1479                                                 </row>\r
1480                                                 </thead>\r
1481                                                 <tbody>\r
1482                                                 \r
1483                                                         <row>\r
1484                                                                 <entry>id</entry>\r
1485                                                                 <entry>bigserial</entry>\r
1486                                                                 <entry>PRIMARY KEY</entry>\r
1487                                                         </row>\r
1488                                                 \r
1489                                                         <row>\r
1490                                                                 <entry>code</entry>\r
1491                                                                 <entry>text</entry>\r
1492                                                                 <entry>NOT NULL;</entry>\r
1493                                                         </row>\r
1494                                                 \r
1495                                                         <row>\r
1496                                                                 <entry>description</entry>\r
1497                                                                 <entry>text</entry>\r
1498                                                                 <entry>NOT NULL;</entry>\r
1499                                                         </row>\r
1500                                                 \r
1501                                                         <row>\r
1502                                                                 <entry>remove</entry>\r
1503                                                                 <entry>text</entry>\r
1504                                                                 <entry>NOT NULL; DEFAULT &apos;&apos;::text;</entry>\r
1505                                                         </row>\r
1506                                                 \r
1507                                                         <row>\r
1508                                                                 <entry>ident</entry>\r
1509                                                                 <entry>boolean</entry>\r
1510                                                                 <entry>NOT NULL; DEFAULT false;</entry>\r
1511                                                         </row>\r
1512                                                 \r
1513                                                 </tbody>\r
1514                                         </tgroup>\r
1515                                 </informaltable>\r
1516                                 <para>\r
1517                                 \r
1518                                 \r
1519                                 \r
1520                                 \r
1521                 </para>\r
1522                 </simplesect>\r
1523                 \r
1524                 <simplesect id="acq.table.lineitem-detail" xreflabel="acq.lineitem_detail">             \r
1525                         <title>lineitem_detail</title>\r
1526                         <informaltable>\r
1527                                 <tgroup cols="3">\r
1528                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
1529                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
1530                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
1531                                         <thead>\r
1532                                                 <row>\r
1533                                                         <entry>Field</entry>\r
1534                                                         <entry>Data Type</entry>\r
1535                                                         <entry>Constraints and References</entry>\r
1536                                                 </row>\r
1537                                                 </thead>\r
1538                                                 <tbody>\r
1539                                                 \r
1540                                                         <row>\r
1541                                                                 <entry>id</entry>\r
1542                                                                 <entry>bigserial</entry>\r
1543                                                                 <entry>PRIMARY KEY</entry>\r
1544                                                         </row>\r
1545                                                 \r
1546                                                         <row>\r
1547                                                                 <entry>lineitem</entry>\r
1548                                                                 <entry>integer</entry>\r
1549                                                                 <entry>NOT NULL; <xref linkend="acq.table.lineitem"/></entry>\r
1550                                                         </row>\r
1551                                                 \r
1552                                                         <row>\r
1553                                                                 <entry>fund</entry>\r
1554                                                                 <entry>integer</entry>\r
1555                                                                 <entry><xref linkend="acq.table.fund"/></entry>\r
1556                                                         </row>\r
1557                                                 \r
1558                                                         <row>\r
1559                                                                 <entry>fund_debit</entry>\r
1560                                                                 <entry>integer</entry>\r
1561                                                                 <entry><xref linkend="acq.table.fund-debit"/></entry>\r
1562                                                         </row>\r
1563                                                 \r
1564                                                         <row>\r
1565                                                                 <entry>eg_copy_id</entry>\r
1566                                                                 <entry>bigint</entry>\r
1567                                                                 <entry><xref linkend="asset.table.copy"/></entry>\r
1568                                                         </row>\r
1569                                                 \r
1570                                                         <row>\r
1571                                                                 <entry>barcode</entry>\r
1572                                                                 <entry>text</entry>\r
1573                                                                 <entry></entry>\r
1574                                                         </row>\r
1575                                                 \r
1576                                                         <row>\r
1577                                                                 <entry>cn_label</entry>\r
1578                                                                 <entry>text</entry>\r
1579                                                                 <entry></entry>\r
1580                                                         </row>\r
1581                                                 \r
1582                                                         <row>\r
1583                                                                 <entry>note</entry>\r
1584                                                                 <entry>text</entry>\r
1585                                                                 <entry></entry>\r
1586                                                         </row>\r
1587                                                 \r
1588                                                         <row>\r
1589                                                                 <entry>collection_code</entry>\r
1590                                                                 <entry>text</entry>\r
1591                                                                 <entry></entry>\r
1592                                                         </row>\r
1593                                                 \r
1594                                                         <row>\r
1595                                                                 <entry>circ_modifier</entry>\r
1596                                                                 <entry>text</entry>\r
1597                                                                 <entry><xref linkend="config.table.circ-modifier"/></entry>\r
1598                                                         </row>\r
1599                                                 \r
1600                                                         <row>\r
1601                                                                 <entry>owning_lib</entry>\r
1602                                                                 <entry>integer</entry>\r
1603                                                                 <entry><xref linkend="actor.table.org-unit"/></entry>\r
1604                                                         </row>\r
1605                                                 \r
1606                                                         <row>\r
1607                                                                 <entry>location</entry>\r
1608                                                                 <entry>integer</entry>\r
1609                                                                 <entry><xref linkend="asset.table.copy-location"/></entry>\r
1610                                                         </row>\r
1611                                                 \r
1612                                                         <row>\r
1613                                                                 <entry>recv_time</entry>\r
1614                                                                 <entry>timestamp with time zone</entry>\r
1615                                                                 <entry></entry>\r
1616                                                         </row>\r
1617                                                 \r
1618                                                 </tbody>\r
1619                                         </tgroup>\r
1620                                 </informaltable>\r
1621                                 <para>\r
1622                                 \r
1623                                 \r
1624                                 \r
1625                                 \r
1626                 </para>\r
1627                 </simplesect>\r
1628                 \r
1629                 <simplesect id="acq.table.lineitem-generated-attr-definition" xreflabel="acq.lineitem_generated_attr_definition">               \r
1630                         <title>lineitem_generated_attr_definition</title>\r
1631                         <informaltable>\r
1632                                 <tgroup cols="3">\r
1633                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
1634                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
1635                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
1636                                         <thead>\r
1637                                                 <row>\r
1638                                                         <entry>Field</entry>\r
1639                                                         <entry>Data Type</entry>\r
1640                                                         <entry>Constraints and References</entry>\r
1641                                                 </row>\r
1642                                                 </thead>\r
1643                                                 <tbody>\r
1644                                                 \r
1645                                                         <row>\r
1646                                                                 <entry>id</entry>\r
1647                                                                 <entry>bigint</entry>\r
1648                                                                 <entry>PRIMARY KEY DEFAULT nextval( &apos;lineitem_attr_definition_id_seq&apos;::regclass );</entry>\r
1649                                                         </row>\r
1650                                                 \r
1651                                                         <row>\r
1652                                                                 <entry>code</entry>\r
1653                                                                 <entry>text</entry>\r
1654                                                                 <entry>NOT NULL;</entry>\r
1655                                                         </row>\r
1656                                                 \r
1657                                                         <row>\r
1658                                                                 <entry>description</entry>\r
1659                                                                 <entry>text</entry>\r
1660                                                                 <entry>NOT NULL;</entry>\r
1661                                                         </row>\r
1662                                                 \r
1663                                                         <row>\r
1664                                                                 <entry>remove</entry>\r
1665                                                                 <entry>text</entry>\r
1666                                                                 <entry>NOT NULL; DEFAULT &apos;&apos;::text;</entry>\r
1667                                                         </row>\r
1668                                                 \r
1669                                                         <row>\r
1670                                                                 <entry>ident</entry>\r
1671                                                                 <entry>boolean</entry>\r
1672                                                                 <entry>NOT NULL; DEFAULT false;</entry>\r
1673                                                         </row>\r
1674                                                 \r
1675                                                         <row>\r
1676                                                                 <entry>xpath</entry>\r
1677                                                                 <entry>text</entry>\r
1678                                                                 <entry>NOT NULL;</entry>\r
1679                                                         </row>\r
1680                                                 \r
1681                                                 </tbody>\r
1682                                         </tgroup>\r
1683                                 </informaltable>\r
1684                                 <para>\r
1685                                 \r
1686                 </para>\r
1687                 </simplesect>\r
1688                 <simplesect id="acq.table.lineitem-local-attr-definition" xreflabel="acq.lineitem_local_attr_definition">               \r
1689                         <title>lineitem_local_attr_definition</title>\r
1690                         <informaltable>\r
1691                                 <tgroup cols="3">\r
1692                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
1693                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
1694                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
1695                                         <thead>\r
1696                                                 <row>\r
1697                                                         <entry>Field</entry>\r
1698                                                         <entry>Data Type</entry>\r
1699                                                         <entry>Constraints and References</entry>\r
1700                                                 </row>\r
1701                                                 </thead>\r
1702                                                 <tbody>\r
1703                                                 \r
1704                                                         <row>\r
1705                                                                 <entry>id</entry>\r
1706                                                                 <entry>bigint</entry>\r
1707                                                                 <entry>PRIMARY KEY DEFAULT nextval( &apos;lineitem_attr_definition_id_seq&apos;::regclass );</entry>\r
1708                                                         </row>\r
1709                                                 \r
1710                                                         <row>\r
1711                                                                 <entry>code</entry>\r
1712                                                                 <entry>text</entry>\r
1713                                                                 <entry>NOT NULL;</entry>\r
1714                                                         </row>\r
1715                                                 \r
1716                                                         <row>\r
1717                                                                 <entry>description</entry>\r
1718                                                                 <entry>text</entry>\r
1719                                                                 <entry>NOT NULL;</entry>\r
1720                                                         </row>\r
1721                                                 \r
1722                                                         <row>\r
1723                                                                 <entry>remove</entry>\r
1724                                                                 <entry>text</entry>\r
1725                                                                 <entry>NOT NULL; DEFAULT &apos;&apos;::text;</entry>\r
1726                                                         </row>\r
1727                                                 \r
1728                                                         <row>\r
1729                                                                 <entry>ident</entry>\r
1730                                                                 <entry>boolean</entry>\r
1731                                                                 <entry>NOT NULL;DEFAULT false;</entry>\r
1732                                                         </row>\r
1733                                                 \r
1734                                                 </tbody>\r
1735                                         </tgroup>\r
1736                                 </informaltable>\r
1737                                 <para>\r
1738                                 \r
1739                                 \r
1740                                 \r
1741                                 \r
1742                 </para>\r
1743                 </simplesect>\r
1744                 \r
1745                 <simplesect id="acq.table.lineitem-marc-attr-definition" xreflabel="acq.lineitem_marc_attr_definition">         \r
1746                         <title>lineitem_marc_attr_definition</title>\r
1747                         <informaltable>\r
1748                                 <tgroup cols="3">\r
1749                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
1750                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
1751                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
1752                                         <thead>\r
1753                                                 <row>\r
1754                                                         <entry>Field</entry>\r
1755                                                         <entry>Data Type</entry>\r
1756                                                         <entry>Constraints and References</entry>\r
1757                                                 </row>\r
1758                                                 </thead>\r
1759                                                 <tbody>\r
1760                                                 \r
1761                                                         <row>\r
1762                                                                 <entry>id</entry>\r
1763                                                                 <entry>bigint</entry>\r
1764                                                                 <entry>PRIMARY KEY DEFAULT nextval( &apos;lineitem_attr_definition_id_seq&apos;::regclass );</entry>\r
1765                                                         </row>\r
1766                                                 \r
1767                                                         <row>\r
1768                                                                 <entry>code</entry>\r
1769                                                                 <entry>text</entry>\r
1770                                                                 <entry>NOT NULL;</entry>\r
1771                                                         </row>\r
1772                                                 \r
1773                                                         <row>\r
1774                                                                 <entry>description</entry>\r
1775                                                                 <entry>text</entry>\r
1776                                                                 <entry>NOT NULL;</entry>\r
1777                                                         </row>\r
1778                                                 \r
1779                                                         <row>\r
1780                                                                 <entry>remove</entry>\r
1781                                                                 <entry>text</entry>\r
1782                                                                 <entry>NOT NULL; DEFAULT &apos;&apos;::text;</entry>\r
1783                                                         </row>\r
1784                                                 \r
1785                                                         <row>\r
1786                                                                 <entry>ident</entry>\r
1787                                                                 <entry>boolean</entry>\r
1788                                                                 <entry>NOT NULL; DEFAULT false;</entry>\r
1789                                                         </row>\r
1790                                                 \r
1791                                                         <row>\r
1792                                                                 <entry>xpath</entry>\r
1793                                                                 <entry>text</entry>\r
1794                                                                 <entry>NOT NULL;</entry>\r
1795                                                         </row>\r
1796                                                 \r
1797                                                 </tbody>\r
1798                                         </tgroup>\r
1799                                 </informaltable>\r
1800                                 <para>\r
1801                                 \r
1802                 </para>\r
1803                 </simplesect>\r
1804                 \r
1805                 <simplesect id="acq.table.lineitem-note" xreflabel="acq.lineitem_note">         \r
1806                         <title>lineitem_note</title>\r
1807                         <informaltable>\r
1808                                 <tgroup cols="3">\r
1809                                         <colspec colnum="1" colname="col1" colwidth="1.0*"/>\r
1810                                         <colspec colnum="2" colname="col2" colwidth="1.0*"/>\r
1811                                         <colspec colnum="3" colname="col3" colwidth="2.0*"/>\r
1812                                         <thead>\r
1813                                                 <row>\r
1814                                                         <entry>Field</entry>\r
1815                                                         <entry>Data Type</entry>\r
1816                                                         <entry>Constraints and References</entry>\r
1817                                                 </row>\r
1818                                                 </thead>\r
1819                                                 <tbody>\r
1820                                                 \r
1821                                                         <row>\r
1822                                                                 <entry>id</entry>\r
1823                                                                 <entry>serial</entry>\r
1824                                                                 <entry>PRIMARY KEY</entry>\r
1825                                                         </row>\r
1826                                                 \r
1827                                                         <row>\r
1828                                                                 <entry>lineitem</entry>\r
1829                                                                 <entry>integer</entry>\r
1830                                                                 <entry>NOT NULL; <xref linkend="acq.table.lineitem"/></entry>\r
1831                                                         </row>\r
1832                                                 \r
1833                                                         <row>\r
1834                                                                 <entry>creator</entry>\r
1835                                                                 <entry>integer</entry>\r
1836                                                                 <entry>NOT NULL; <xref linkend="actor.table.usr"/></entry>\r
1837