Alle Tables mit id Spalte versehen. Taxkey und Licemse naming gefixt.
Ausserdem eine Funktion db eingefügt, die in package main sitzt und die
passenden Datenbankmodels zurückgibt, siehe Helpers::Mappings
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::AccTrans;
+
+use strict;
+
+use SL::DB::MetaSetup::AccTrans;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::AccTransaction;
+
+use strict;
+
+use SL::DB::MetaSetup::AccTransaction;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::AuditTrail;
+
+use strict;
+
+use SL::DB::MetaSetup::AuditTrail;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::CustomerTax;
+
+use strict;
+
+use SL::DB::MetaSetup::CustomerTax;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::Datev;
+
+use strict;
+
+use SL::DB::MetaSetup::Datev;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::Default;
+
+use strict;
+
+use SL::DB::MetaSetup::Default;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::Department;
+
+use strict;
+
+use SL::DB::MetaSetup::Department;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::DptTrans;
+
+use strict;
+
+use SL::DB::MetaSetup::DptTrans;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::Exchangerate;
+
+use strict;
+
+use SL::DB::MetaSetup::Exchangerate;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::Finanzamt;
+
+use strict;
+
+use SL::DB::MetaSetup::Finanzamt;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::FollowUpAccess;
+
+use strict;
+
+use SL::DB::MetaSetup::FollowUpAccess;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::Gifi;
+
+use strict;
+
+use SL::DB::MetaSetup::Gifi;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
use strict;
+use SL::DB::AccTrans;
+use SL::DB::AccTransaction;
use SL::DB::Assembly;
+use SL::DB::AuditTrail;
use SL::DB::BankAccount;
use SL::DB::Bin;
use SL::DB::Buchungsgruppe;
use SL::DB::CustomVariableConfig;
use SL::DB::CustomVariableValidity;
use SL::DB::Customer;
+use SL::DB::CustomerTax;
+use SL::DB::Datev;
+use SL::DB::Default;
use SL::DB::DeliveryOrder;
use SL::DB::DeliveryOrderItem;
use SL::DB::DeliveryOrderItemsStock;
+use SL::DB::Department;
+use SL::DB::DptTrans;
use SL::DB::Draft;
use SL::DB::Dunning;
use SL::DB::DunningConfig;
use SL::DB::Employee;
+use SL::DB::Exchangerate;
+use SL::DB::Finanzamt;
use SL::DB::FollowUp;
+use SL::DB::FollowUpAccess;
use SL::DB::FollowUpLink;
use SL::DB::GLTransaction;
use SL::DB::GenericTranslation;
+use SL::DB::Gifi;
use SL::DB::History;
+use SL::DB::Inventory;
use SL::DB::Invoice;
use SL::DB::InvoiceItem;
use SL::DB::Language;
-use SL::DB::Licemse;
+use SL::DB::Lead;
+use SL::DB::License;
+use SL::DB::LicenseInvoice;
+use SL::DB::MakeModel;
use SL::DB::Note;
use SL::DB::Order;
use SL::DB::OrderItem;
use SL::DB::Part;
+use SL::DB::PartsGroup;
+use SL::DB::PartsTax;
use SL::DB::PaymentTerm;
use SL::DB::PriceFactor;
use SL::DB::Pricegroup;
+use SL::DB::Prices;
use SL::DB::Printer;
use SL::DB::Project;
use SL::DB::PurchaseInvoice;
use SL::DB::RMA;
+use SL::DB::RMAItem;
+use SL::DB::RecordLink;
+use SL::DB::SchemaInfo;
use SL::DB::SepaExport;
use SL::DB::SepaExportItem;
-use SL::DB::SchemaInfo;
use SL::DB::Shipto;
+use SL::DB::Status;
use SL::DB::Tax;
-use SL::DB::Taxkey;
+use SL::DB::TaxKey;
+use SL::DB::TaxZone;
+use SL::DB::TodoUserConfig;
use SL::DB::TransferType;
+use SL::DB::Translation;
+use SL::DB::TranslationPaymentTerm;
use SL::DB::Unit;
+use SL::DB::UnitsLanguage;
use SL::DB::Vendor;
+use SL::DB::VendorTax;
use SL::DB::Warehouse;
-
-
1;
__END__
use strict;
-use Exporter qw(import);
-
-our @EXPORT_OK = qw(db);
-
# these will not be managed as Rose::DB models, because they are not normalized
# significant changes are needed to get them done.
my @lxoffice_blacklist_permanent = qw(
- acc_trans audittrail customertax datev defaults department dpt_trans
- exchangerate finanzamt follow_up_access gifi inventory leads licenseinvoice
- makemodel partsgroup partstax prices record_links rmaitems status tax_zones
- todo_user_config translation translation_payment_terms units_language
- vendortax);
+);
# these are not managed _yet_, but will hopefully at some point.
# if you are confident that one of these works, remove it here.
# unlike rails we have no singular<->plural magic.
# remeber: tables should be named as the plural of the model name.
my %lxoffice_package_names = (
+ acc_trans => 'acc_transaction',
+ audittrail => 'audit_trail',
ar => 'invoice',
ap => 'purchase_invoice',
bank_accounts => 'bank_account',
custom_variable_configs => 'custom_variable_config',
custom_variables => 'custom_variable',
custom_variables_validity => 'custom_variable_validity',
+ customertax => 'customer_tax',
+ datev => 'datev',
+ defaults => 'default',
delivery_orders => 'delivery_order',
delivery_order_items => 'delivery_order_item',
+ department => 'department',
+ dpt_trans => 'dpt_trans',
drafts => 'draft',
dunning => 'dunning',
dunning_config => 'dunning_config',
employee => 'employee',
+ exchangerate => 'exchangerate',
+ finanzamt => 'finanzamt',
+ follow_up_access => 'follow_up_access',
follow_up_links => 'follow_up_link',
follow_ups => 'follow_up',
generic_translations => 'generic_translation',
+ gifi => 'gifi',
gl => 'GLTransaction',
history_erp => 'history',
+ inventory => 'inventory',
invoice => 'invoice_item',
language => 'language',
- license => 'licemse',
+ leads => 'lead',
+ license => 'license',
+ licenseinvoice => 'license_invoice',
+ makemodel => 'make_model',
notes => 'note',
orderitems => 'order_item',
oe => 'order',
parts => 'part',
+ partsgroup => 'parts_group',
+ partstax => 'parts_tax',
payment_terms => 'payment_term',
+ prices => 'prices',
price_factors => 'price_factor',
pricegroup => 'pricegroup',
printers => 'Printer',
+ record_links => 'record_link',
rma => 'RMA',
+ rmaitems => 'RMA_item',
sepa_export => 'sepa_export',
sepa_export_items => 'sepa_export_item',
schema_info => 'schema_info',
+ status => 'status',
tax => 'tax',
- taxkeys => 'taxkey',
+ taxkeys => 'tax_key',
+ tax_zones => 'tax_zone',
+ todo_user_config => 'todo_user_config',
+ translation => 'translation',
+ translation_payment_terms => 'translation_payment_term',
units => 'unit',
+ units_language => 'units_language',
+ vendortax => 'vendor_tax',
);
sub get_blacklist {
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::Inventory;
+
+use strict;
+
+use SL::DB::MetaSetup::Inventory;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::Lead;
+
+use strict;
+
+use SL::DB::MetaSetup::Lead;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
+++ /dev/null
-# This file has been auto-generated only because it didn't exist.
-# Feel free to modify it at will; it will not be overwritten automatically.
-
-package SL::DB::Licemse;
-
-use strict;
-
-use SL::DB::MetaSetup::Licemse;
-
-# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
-__PACKAGE__->meta->make_manager_class;
-
-1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::License;
+
+use strict;
+
+use SL::DB::MetaSetup::License;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::LicenseInvoice;
+
+use strict;
+
+use SL::DB::MetaSetup::LicenseInvoice;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::MakeModel;
+
+use strict;
+
+use SL::DB::MetaSetup::MakeModel;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::AccTrans;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'acc_trans',
+
+ columns => [
+ acc_trans_id => { type => 'bigint', sequence => 'acc_trans_id_seq' },
+ trans_id => { type => 'integer', not_null => 1 },
+ chart_id => { type => 'integer', not_null => 1 },
+ amount => { type => 'numeric', precision => 5, scale => 15 },
+ transdate => { type => 'date', default => 'now' },
+ gldate => { type => 'date', default => 'now' },
+ source => { type => 'text' },
+ cleared => { type => 'boolean', default => 'false' },
+ fx_transaction => { type => 'boolean', default => 'false' },
+ ob_transaction => { type => 'boolean', default => 'false' },
+ cb_transaction => { type => 'boolean', default => 'false' },
+ project_id => { type => 'integer' },
+ memo => { type => 'text' },
+ taxkey => { type => 'integer' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ id => { type => 'integer', not_null => 1, sequence => 'acc_trans_id_seq1' },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ allow_inline_column_values => 1,
+
+ foreign_keys => [
+ chart => {
+ class => 'SL::DB::Chart',
+ key_columns => { chart_id => 'id' },
+ },
+
+ project => {
+ class => 'SL::DB::Project',
+ key_columns => { project_id => 'id' },
+ },
+ ],
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::AccTransaction;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'acc_trans',
+
+ columns => [
+ acc_trans_id => { type => 'bigint', sequence => 'acc_trans_id_seq' },
+ trans_id => { type => 'integer', not_null => 1 },
+ chart_id => { type => 'integer', not_null => 1 },
+ amount => { type => 'numeric', precision => 5, scale => 15 },
+ transdate => { type => 'date', default => 'now' },
+ gldate => { type => 'date', default => 'now' },
+ source => { type => 'text' },
+ cleared => { type => 'boolean', default => 'false' },
+ fx_transaction => { type => 'boolean', default => 'false' },
+ ob_transaction => { type => 'boolean', default => 'false' },
+ cb_transaction => { type => 'boolean', default => 'false' },
+ project_id => { type => 'integer' },
+ memo => { type => 'text' },
+ taxkey => { type => 'integer' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ id => { type => 'integer', not_null => 1, sequence => 'acc_trans_id_seq1' },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ allow_inline_column_values => 1,
+
+ foreign_keys => [
+ chart => {
+ class => 'SL::DB::Chart',
+ key_columns => { chart_id => 'id' },
+ },
+
+ project => {
+ class => 'SL::DB::Project',
+ key_columns => { project_id => 'id' },
+ },
+ ],
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::AuditTrail;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'audittrail',
+
+ columns => [
+ trans_id => { type => 'integer' },
+ tablename => { type => 'text' },
+ reference => { type => 'text' },
+ formname => { type => 'text' },
+ action => { type => 'text' },
+ transdate => { type => 'timestamp', default => 'now' },
+ employee_id => { type => 'integer' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::CustomerTax;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'customertax',
+
+ columns => [
+ customer_id => { type => 'integer' },
+ chart_id => { type => 'integer' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ allow_inline_column_values => 1,
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::Datev;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'datev',
+
+ columns => [
+ beraternr => { type => 'varchar', length => 7 },
+ beratername => { type => 'varchar', length => 9 },
+ mandantennr => { type => 'varchar', length => 5 },
+ dfvkz => { type => 'varchar', length => 2 },
+ datentraegernr => { type => 'varchar', length => 3 },
+ abrechnungsnr => { type => 'varchar', length => 6 },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ allow_inline_column_values => 1,
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::Default;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'defaults',
+
+ columns => [
+ inventory_accno_id => { type => 'integer' },
+ income_accno_id => { type => 'integer' },
+ expense_accno_id => { type => 'integer' },
+ fxgain_accno_id => { type => 'integer' },
+ fxloss_accno_id => { type => 'integer' },
+ invnumber => { type => 'text' },
+ sonumber => { type => 'text' },
+ yearend => { type => 'varchar', length => 5 },
+ weightunit => { type => 'varchar', length => 5 },
+ businessnumber => { type => 'text' },
+ version => { type => 'varchar', length => 8 },
+ curr => { type => 'text' },
+ closedto => { type => 'date' },
+ revtrans => { type => 'boolean', default => 'false' },
+ ponumber => { type => 'text' },
+ sqnumber => { type => 'text' },
+ rfqnumber => { type => 'text' },
+ customernumber => { type => 'text' },
+ vendornumber => { type => 'text' },
+ audittrail => { type => 'boolean', default => 'false' },
+ articlenumber => { type => 'text' },
+ servicenumber => { type => 'text' },
+ coa => { type => 'text' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ rmanumber => { type => 'text' },
+ cnnumber => { type => 'text' },
+ dunning_ar_amount_fee => { type => 'integer' },
+ dunning_ar_amount_interest => { type => 'integer' },
+ dunning_ar => { type => 'integer' },
+ pdonumber => { type => 'text' },
+ sdonumber => { type => 'text' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ allow_inline_column_values => 1,
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::Department;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'department',
+
+ columns => [
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ description => { type => 'text' },
+ role => { type => 'character', default => 'P', length => 1 },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ allow_inline_column_values => 1,
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::DptTrans;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'dpt_trans',
+
+ columns => [
+ trans_id => { type => 'integer' },
+ department_id => { type => 'integer' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ allow_inline_column_values => 1,
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::Exchangerate;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'exchangerate',
+
+ columns => [
+ curr => { type => 'character', length => 3 },
+ transdate => { type => 'date' },
+ buy => { type => 'numeric', precision => 5, scale => 15 },
+ sell => { type => 'numeric', precision => 5, scale => 15 },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ allow_inline_column_values => 1,
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::Finanzamt;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'finanzamt',
+
+ columns => [
+ fa_land_nr => { type => 'text' },
+ fa_bufa_nr => { type => 'text' },
+ fa_name => { type => 'text' },
+ fa_strasse => { type => 'text' },
+ fa_plz => { type => 'text' },
+ fa_ort => { type => 'text' },
+ fa_telefon => { type => 'text' },
+ fa_fax => { type => 'text' },
+ fa_plz_grosskunden => { type => 'text' },
+ fa_plz_postfach => { type => 'text' },
+ fa_postfach => { type => 'text' },
+ fa_blz_1 => { type => 'text' },
+ fa_kontonummer_1 => { type => 'text' },
+ fa_bankbezeichnung_1 => { type => 'text' },
+ fa_blz_2 => { type => 'text' },
+ fa_kontonummer_2 => { type => 'text' },
+ fa_bankbezeichnung_2 => { type => 'text' },
+ fa_oeffnungszeiten => { type => 'text' },
+ fa_email => { type => 'text' },
+ fa_internet => { type => 'text' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::FollowUpAccess;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'follow_up_access',
+
+ columns => [
+ who => { type => 'integer', not_null => 1 },
+ what => { type => 'integer', not_null => 1 },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ foreign_keys => [
+ employee => {
+ class => 'SL::DB::Employee',
+ key_columns => { who => 'id' },
+ },
+
+ employee_obj => {
+ class => 'SL::DB::Employee',
+ key_columns => { what => 'id' },
+ },
+ ],
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::Gifi;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'gifi',
+
+ columns => [
+ accno => { type => 'text' },
+ description => { type => 'text' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ unique_key => [ 'accno' ],
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::Inventory;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'inventory',
+
+ columns => [
+ warehouse_id => { type => 'integer', not_null => 1 },
+ parts_id => { type => 'integer', not_null => 1 },
+ oe_id => { type => 'integer' },
+ orderitems_id => { type => 'integer' },
+ shippingdate => { type => 'date' },
+ employee_id => { type => 'integer', not_null => 1 },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ bin_id => { type => 'integer', not_null => 1 },
+ qty => { type => 'numeric', precision => 5, scale => 25 },
+ trans_id => { type => 'integer', not_null => 1 },
+ trans_type_id => { type => 'integer', not_null => 1 },
+ project_id => { type => 'integer' },
+ chargenumber => { type => 'text' },
+ comment => { type => 'text' },
+ bestbefore => { type => 'date' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ allow_inline_column_values => 1,
+
+ foreign_keys => [
+ bin => {
+ class => 'SL::DB::Bin',
+ key_columns => { bin_id => 'id' },
+ },
+
+ employee => {
+ class => 'SL::DB::Employee',
+ key_columns => { employee_id => 'id' },
+ },
+
+ parts => {
+ class => 'SL::DB::Part',
+ key_columns => { parts_id => 'id' },
+ },
+
+ project => {
+ class => 'SL::DB::Project',
+ key_columns => { project_id => 'id' },
+ },
+
+ trans_type => {
+ class => 'SL::DB::TransferType',
+ key_columns => { trans_type_id => 'id' },
+ },
+
+ warehouse => {
+ class => 'SL::DB::Warehouse',
+ key_columns => { warehouse_id => 'id' },
+ },
+ ],
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::Lead;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'leads',
+
+ columns => [
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ lead => { type => 'varchar', length => 50 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::License;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'license',
+
+ columns => [
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ parts_id => { type => 'integer' },
+ customer_id => { type => 'integer' },
+ comment => { type => 'text' },
+ validuntil => { type => 'date' },
+ issuedate => { type => 'date', default => 'now' },
+ quantity => { type => 'integer' },
+ licensenumber => { type => 'text' },
+ ],
+
+ primary_key_columns => [ 'id' ],
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::LicenseInvoice;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'licenseinvoice',
+
+ columns => [
+ trans_id => { type => 'integer' },
+ license_id => { type => 'integer' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::MakeModel;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'makemodel',
+
+ columns => [
+ parts_id => { type => 'integer' },
+ model => { type => 'text' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ make => { type => 'integer' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ allow_inline_column_values => 1,
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::PartsGroup;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'partsgroup',
+
+ columns => [
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ partsgroup => { type => 'text' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ allow_inline_column_values => 1,
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::PartsTax;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'partstax',
+
+ columns => [
+ parts_id => { type => 'integer' },
+ chart_id => { type => 'integer' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ allow_inline_column_values => 1,
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::Prices;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'prices',
+
+ columns => [
+ parts_id => { type => 'integer' },
+ pricegroup_id => { type => 'integer' },
+ price => { type => 'numeric', precision => 5, scale => 15 },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ foreign_keys => [
+ parts => {
+ class => 'SL::DB::Part',
+ key_columns => { parts_id => 'id' },
+ },
+
+ pricegroup => {
+ class => 'SL::DB::Pricegroup',
+ key_columns => { pricegroup_id => 'id' },
+ },
+ ],
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::RMAItem;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'rmaitems',
+
+ columns => [
+ trans_id => { type => 'integer' },
+ parts_id => { type => 'integer' },
+ description => { type => 'text' },
+ qty => { type => 'float', precision => 4 },
+ base_qty => { type => 'float', precision => 4 },
+ sellprice => { type => 'numeric', precision => 5, scale => 15 },
+ discount => { type => 'float', precision => 4 },
+ project_id => { type => 'integer' },
+ reqdate => { type => 'date' },
+ ship => { type => 'float', precision => 4 },
+ serialnumber => { type => 'text' },
+ id => { type => 'integer', not_null => 1, sequence => 'orderitemsid' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ pricegroup_id => { type => 'integer' },
+ rmanumber => { type => 'text' },
+ transdate => { type => 'text' },
+ cusrmanumber => { type => 'text' },
+ unit => { type => 'varchar', length => 20 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ allow_inline_column_values => 1,
+
+ foreign_keys => [
+ parts => {
+ class => 'SL::DB::Part',
+ key_columns => { parts_id => 'id' },
+ },
+ ],
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::RecordLink;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'record_links',
+
+ columns => [
+ from_table => { type => 'varchar', length => 50, not_null => 1 },
+ from_id => { type => 'integer', not_null => 1 },
+ to_table => { type => 'varchar', length => 50, not_null => 1 },
+ to_id => { type => 'integer', not_null => 1 },
+ itime => { type => 'timestamp', default => 'now()' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ allow_inline_column_values => 1,
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::Status;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'status',
+
+ columns => [
+ trans_id => { type => 'integer' },
+ formname => { type => 'text' },
+ printed => { type => 'boolean', default => 'false' },
+ emailed => { type => 'boolean', default => 'false' },
+ spoolfile => { type => 'text' },
+ chart_id => { type => 'integer' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ allow_inline_column_values => 1,
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::TaxKey;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'taxkeys',
+
+ columns => [
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ chart_id => { type => 'integer' },
+ tax_id => { type => 'integer' },
+ taxkey_id => { type => 'integer' },
+ pos_ustva => { type => 'integer' },
+ startdate => { type => 'date' },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ foreign_keys => [
+ tax => {
+ class => 'SL::DB::Tax',
+ key_columns => { tax_id => 'id' },
+ },
+ ],
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::TaxZone;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'tax_zones',
+
+ columns => [
+ id => { type => 'integer', not_null => 1 },
+ description => { type => 'text' },
+ ],
+
+ primary_key_columns => [ 'id' ],
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::TodoUserConfig;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'todo_user_config',
+
+ columns => [
+ employee_id => { type => 'integer', not_null => 1 },
+ show_after_login => { type => 'boolean', default => 'true' },
+ show_follow_ups => { type => 'boolean', default => 'true' },
+ show_follow_ups_login => { type => 'boolean', default => 'true' },
+ show_overdue_sales_quotations => { type => 'boolean', default => 'true' },
+ show_overdue_sales_quotations_login => { type => 'boolean', default => 'true' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ foreign_keys => [
+ employee => {
+ class => 'SL::DB::Employee',
+ key_columns => { employee_id => 'id' },
+ },
+ ],
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::Translation;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'translation',
+
+ columns => [
+ parts_id => { type => 'integer' },
+ language_id => { type => 'integer' },
+ translation => { type => 'text' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ longdescription => { type => 'text' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ allow_inline_column_values => 1,
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::TranslationPaymentTerm;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'translation_payment_terms',
+
+ columns => [
+ payment_terms_id => { type => 'integer', not_null => 1 },
+ language_id => { type => 'integer', not_null => 1 },
+ description_long => { type => 'text' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ foreign_keys => [
+ language => {
+ class => 'SL::DB::Language',
+ key_columns => { language_id => 'id' },
+ },
+
+ payment_terms => {
+ class => 'SL::DB::PaymentTerm',
+ key_columns => { payment_terms_id => 'id' },
+ },
+ ],
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::UnitsLanguage;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'units_language',
+
+ columns => [
+ unit => { type => 'varchar', length => 20, not_null => 1 },
+ language_id => { type => 'integer', not_null => 1 },
+ localized => { type => 'varchar', length => 20 },
+ localized_plural => { type => 'varchar', length => 20 },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ foreign_keys => [
+ language => {
+ class => 'SL::DB::Language',
+ key_columns => { language_id => 'id' },
+ },
+
+ unit_obj => {
+ class => 'SL::DB::Unit',
+ key_columns => { unit => 'name' },
+ },
+ ],
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::VendorTax;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->setup(
+ table => 'vendortax',
+
+ columns => [
+ vendor_id => { type => 'integer' },
+ chart_id => { type => 'integer' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ id => { type => 'serial', not_null => 1 },
+ ],
+
+ primary_key_columns => [ 'id' ],
+
+ allow_inline_column_values => 1,
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::PartsGroup;
+
+use strict;
+
+use SL::DB::MetaSetup::PartsGroup;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::PartsTax;
+
+use strict;
+
+use SL::DB::MetaSetup::PartsTax;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::Prices;
+
+use strict;
+
+use SL::DB::MetaSetup::Prices;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::RMAItem;
+
+use strict;
+
+use SL::DB::MetaSetup::RMAItem;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::RecordLink;
+
+use strict;
+
+use SL::DB::MetaSetup::RecordLink;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::Status;
+
+use strict;
+
+use SL::DB::MetaSetup::Status;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::TaxKey;
+
+use strict;
+
+use SL::DB::MetaSetup::TaxKey;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::TaxZone;
+
+use strict;
+
+use SL::DB::MetaSetup::TaxZone;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
+++ /dev/null
-# This file has been auto-generated only because it didn't exist.
-# Feel free to modify it at will; it will not be overwritten automatically.
-
-package SL::DB::Taxkey;
-
-use strict;
-
-use SL::DB::MetaSetup::Taxkey;
-
-# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
-__PACKAGE__->meta->make_manager_class;
-
-1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::TodoUserConfig;
+
+use strict;
+
+use SL::DB::MetaSetup::TodoUserConfig;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::Translation;
+
+use strict;
+
+use SL::DB::MetaSetup::Translation;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::TranslationPaymentTerm;
+
+use strict;
+
+use SL::DB::MetaSetup::TranslationPaymentTerm;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::UnitsLanguage;
+
+use strict;
+
+use SL::DB::MetaSetup::UnitsLanguage;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::VendorTax;
+
+use strict;
+
+use SL::DB::MetaSetup::VendorTax;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+1;
$main::lxdebug->leave_sub();
}
+if ($::use_rdbo) {
+ eval {
+ require SL::DB::Helpers::Mappings;
+ sub db {
+ goto &SL::DB::Helpers::Mappings::db;
+ }
+ } or die $@;
+}
+
1;
use Cwd;
-use vars qw($dbcharset $eur $ghostscript_bin $html2ps_bin $language $latex_bin $latex_templates $lizenzen $memberfile
- $opendocument_templates $openofficeorg_daemon $openofficeorg_daemon_port $openofficeorg_writer_bin
- $pg_dump_exe $pg_restore_exe $sendmail $show_best_before $sid $spool $templates $userspath $vertreter $webdav $xvfb_bin);
+use vars qw(
+$dbcharset $eur $ghostscript_bin $html2ps_bin $language $latex_bin
+$latex_templates $lizenzen $memberfile $opendocument_templates
+$openofficeorg_daemon $openofficeorg_daemon_port $openofficeorg_writer_bin
+$pg_dump_exe $pg_restore_exe $sendmail $show_best_before $sid $spool $templates
+$use_rdbo $userspath $vertreter $webdav $xvfb_bin
+);
# path to user configuration files
$userspath = "users";
$pg_dump_exe = "pg_dump";
$pg_restore_exe = "pg_restore";
+# Rose::DB::Object Environment laden.
+# Die RDBO Klassen bieten für Addon Schreiber sehr einfache Interfaces zu den
+# bestehenden Klassen, haben aber den Nachteil, dass der Start des Programms
+# etwa 2s mehr dauert. Damit fällt die Möglichkeit Lx-Office über CGI zu
+# betreiben weg.
+$use_rdbo = 1;
+
# Globale Debug-Ausgaben (de-)aktivieren? Moegliche Werte sind
# LXDebug::NONE - keine Debugausgaben
# LXDebug::INFO
--- /dev/null
+-- @tag: schema_normalization_2
+-- @description: Datenbankschema Normalisierungen Teil 2
+-- @depends: schema_normalization_1
+
+ALTER TABLE acc_trans ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE audittrail ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE customertax ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE datev ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE defaults ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE department ADD PRIMARY KEY (id);
+ALTER TABLE dpt_trans ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE exchangerate ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE finanzamt ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE follow_up_access ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE gifi ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE inventory ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE licenseinvoice ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE leads ADD PRIMARY KEY (id);
+ALTER TABLE partsgroup ADD PRIMARY KEY (id);
+ALTER TABLE partstax ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE prices ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE record_links ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE rmaitems ADD PRIMARY KEY (id);
+ALTER TABLE status ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE tax_zones ADD PRIMARY KEY (id);
+ALTER TABLE todo_user_config ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE translation ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE translation_payment_terms ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE units_language ADD COLUMN id SERIAL PRIMARY KEY;
+ALTER TABLE vendortax ADD COLUMN id SERIAL PRIMARY KEY;