From: levinse Date: Fri, 3 Dec 2010 23:38:27 +0000 (+0000) Subject: fix use of reserved sql word in dsl_note schema, RT7111/RT10806 X-Git-Tag: TORRUS_1_0_9~47 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=f626fd72d814be2245c5cf7b2fd3e63b0e8164b4 fix use of reserved sql word in dsl_note schema, RT7111/RT10806 --- diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 5f78b51f8..7cccc7fdc 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -1871,7 +1871,7 @@ sub tables_hashref { 'columns' => [ 'notenum', 'serial', '', '', '', '', 'svcnum', 'int', '', '', '', '', - 'user', 'varchar', 'NULL', $char_d, '', '', + 'author', 'varchar', 'NULL', $char_d, '', '', 'priority', 'char', 'NULL', 1, '', '', '_date', 'int', 'NULL', '', '', '', 'note', 'text', '', '', '', '', diff --git a/FS/FS/dsl_note.pm b/FS/FS/dsl_note.pm index 0155cbd11..832fced92 100644 --- a/FS/FS/dsl_note.pm +++ b/FS/FS/dsl_note.pm @@ -34,7 +34,7 @@ FS::Record. The following fields are currently supported: =item svcnum - the DSL for this note, see L -=item user - export-specific, e.g. note's author or ISP vs. telco/vendor +=item author - export-specific, e.g. note's author or ISP vs. telco/vendor =item priority - export-specific, e.g. high priority or not; not used by most @@ -105,7 +105,7 @@ sub check { my $error = $self->ut_numbern('notenum') || $self->ut_foreign_key('svcnum', 'svc_dsl', 'svcnum') - || $self->ut_textn('user') + || $self->ut_textn('author') || $self->ut_alphasn('priority') || $self->ut_numbern('_date') || $self->ut_text('note') diff --git a/FS/FS/part_export/ikano.pm b/FS/FS/part_export/ikano.pm index 6316b298d..bae683a12 100644 --- a/FS/FS/part_export/ikano.pm +++ b/FS/FS/part_export/ikano.pm @@ -250,7 +250,7 @@ sub ikano2fsnote { new FS::dsl_note( { 'svcnum' => $svcnum, - 'user' => $by, + 'author' => $by, 'priority' => $n->{'HighPriority'} eq 'false' ? 'N' : 'H', '_date' => int(str2time($n->{'Date'})), 'note' => $n->{'Text'}, diff --git a/etc/sql-reserved-words.txt b/etc/sql-reserved-words.txt index 89dea74af..553eda282 100644 --- a/etc/sql-reserved-words.txt +++ b/etc/sql-reserved-words.txt @@ -1,3 +1,9 @@ +The data below is wrong/incomplete, see: +PG8.3 - http://www.postgresql.org/docs/8.3/static/sql-keywords-appendix.html +MySQL5.6 - http://dev.mysql.com/doc/refman/5.6/en/reserved-words.html +------------------------------------------------------------------------------- + + From http://epoch.cs.berkeley.edu:8000/sequoia/dba/montage/FAQ/SQL.html by Jean Anderson (jta@postgres.berkeley.edu)