ydim 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitattributes +1 -0
- data/.gitignore +6 -0
- data/.travis.yml +26 -0
- data/Gemfile +11 -0
- data/History.txt +7 -2
- data/Rakefile +16 -23
- data/bin/migrate_to_utf_8 +201 -0
- data/bin/ydim-edit +7 -1
- data/bin/ydim-inject +2 -1
- data/bin/ydimd +4 -2
- data/lib/pdfinvoice/config.rb +53 -0
- data/lib/pdfinvoice/invoice.rb +203 -0
- data/lib/ydim/config.rb +1 -1
- data/lib/ydim/factory.rb +1 -0
- data/lib/ydim/invoice.rb +22 -1
- data/lib/ydim/odba.rb +1 -0
- data/lib/ydim/root_session.rb +12 -5
- data/lib/ydim/server.rb +6 -3
- data/lib/ydim/version.rb +3 -0
- data/readme.md +29 -0
- data/set_initial_ydim_db.sql +440 -0
- data/test/data/config.yml +44 -0
- data/test/data/logo.png +0 -0
- data/test/suite.rb +9 -4
- data/test/test_autoinvoicer.rb +3 -3
- data/test/test_currency_converter.rb +3 -2
- data/test/test_currency_updater.rb +3 -3
- data/test/test_debitor.rb +3 -3
- data/test/test_factory.rb +5 -6
- data/test/test_invoice.rb +69 -23
- data/test/test_item.rb +6 -4
- data/test/test_mail.rb +10 -5
- data/test/test_root_session.rb +15 -15
- data/test/test_root_user.rb +3 -2
- data/test/test_server.rb +7 -14
- data/ydim.gemspec +40 -0
- metadata +302 -72
- data/README.txt +0 -21
data/lib/ydim/config.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# encoding: utf-8
|
2
3
|
# CONFIG -- ydim -- 12.01.2006 -- hwyss@ywesee.com
|
3
4
|
|
4
5
|
require 'rclconf'
|
5
6
|
require 'fileutils'
|
6
7
|
|
7
8
|
module YDIM
|
8
|
-
VERSION = '1.0.0'
|
9
9
|
class Client
|
10
10
|
home_dir = ENV['HOME'] || '/tmp'
|
11
11
|
ydim_default_dir = File.join(home_dir, '.ydim')
|
data/lib/ydim/factory.rb
CHANGED
data/lib/ydim/invoice.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
#
|
2
|
+
# encoding: utf-8
|
3
|
+
# YDIM::Invoice -- ydim -- 12.12.2012 -- hwyss@ywesee.com
|
4
|
+
# YDIM::Invoice -- ydim -- 11.01.2006 -- hwyss@ywesee.com
|
3
5
|
|
4
6
|
require 'pdfinvoice/config'
|
5
7
|
require 'pdfinvoice/invoice'
|
@@ -27,6 +29,9 @@ module YDIM
|
|
27
29
|
@items.inject(0.0) { |value, item| value + item.send(key) }
|
28
30
|
}
|
29
31
|
end
|
32
|
+
def date=(d)
|
33
|
+
@date = Date.new(d.year, d.month, d.day)
|
34
|
+
end
|
30
35
|
def initialize(unique_id)
|
31
36
|
@unique_id = unique_id
|
32
37
|
@items = []
|
@@ -64,6 +69,17 @@ module YDIM
|
|
64
69
|
@date + @payment_period.to_i
|
65
70
|
end
|
66
71
|
end
|
72
|
+
def date
|
73
|
+
if !@date || @date.year < 0
|
74
|
+
if @date && @items.first && @items.first.time
|
75
|
+
@date = Date.new(@items.first.time.year, @items.first.time.month, @items.first.time.day)
|
76
|
+
else
|
77
|
+
@date = Date.today
|
78
|
+
end
|
79
|
+
else
|
80
|
+
@date
|
81
|
+
end
|
82
|
+
end
|
67
83
|
def empty?
|
68
84
|
@items.empty?
|
69
85
|
end
|
@@ -89,6 +105,11 @@ module YDIM
|
|
89
105
|
config = PdfInvoice.config.dup
|
90
106
|
config.formats['quantity'] = "%1.#{@precision}f"
|
91
107
|
config.formats['total'] = "#{@currency} %1.2f"
|
108
|
+
if(item = @items[0])
|
109
|
+
if((item.vat_rate - YDIM::Server.config.vat_rate).abs > 0.1)
|
110
|
+
config.texts['tax'] = "MwSt 7.6%"
|
111
|
+
end
|
112
|
+
end
|
92
113
|
invoice = PdfInvoice::Invoice.new(config)
|
93
114
|
invoice.date = @date
|
94
115
|
invoice.invoice_number = @unique_id
|
data/lib/ydim/odba.rb
CHANGED
data/lib/ydim/root_session.rb
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
# RootSession -- ydim -- 10.01.2006 -- hwyss@ywesee.com
|
3
3
|
|
4
4
|
require 'drb'
|
5
|
-
require 'encoding/character/utf-8'
|
6
5
|
require 'ydim/autoinvoicer'
|
7
6
|
require 'ydim/debitor'
|
8
7
|
require 'ydim/invoice'
|
@@ -81,10 +80,18 @@ module YDIM
|
|
81
80
|
raise IndexError, msg
|
82
81
|
end
|
83
82
|
end
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
83
|
+
def debitors
|
84
|
+
@serv.logger.debug(whoami) { "debitors" } if @serv && @serv.respond_to?(:logger)
|
85
|
+
Debitor.odba_extent
|
86
|
+
end
|
87
|
+
def invoices
|
88
|
+
@serv.logger.debug(whoami) { "invoices" } if @serv && @serv.respond_to?(:logger)
|
89
|
+
Invoice.odba_extent
|
90
|
+
end
|
91
|
+
def autoinvoices
|
92
|
+
@serv.logger.debug(whoami) { "autoinvoices" } if @serv && @serv.respond_to?(:logger)
|
93
|
+
AutoInvoice.odba_extent
|
94
|
+
end
|
88
95
|
def delete_autoinvoice(invoice_id)
|
89
96
|
@serv.logger.debug(whoami) {
|
90
97
|
"delete_autoinvoice(#{invoice_id})" }
|
data/lib/ydim/server.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
#
|
2
|
+
# encoding: utf-8
|
3
|
+
# YDIM::Server -- ydim -- 09.12.2011 -- mhatakeyama@ywesee.com
|
4
|
+
# YDIM::Server -- ydim -- 10.01.2006 -- hwyss@ywesee.com
|
3
5
|
|
4
6
|
require 'logger'
|
5
7
|
require 'needle'
|
@@ -12,6 +14,7 @@ require 'ydim/currency_updater'
|
|
12
14
|
require 'ydim/factory'
|
13
15
|
require 'ydim/root_user'
|
14
16
|
require 'ydim/util'
|
17
|
+
require 'odba/18_19_loading_compatibility'
|
15
18
|
|
16
19
|
module YDIM
|
17
20
|
class Server
|
@@ -55,7 +58,7 @@ module YDIM
|
|
55
58
|
'smtp_port' => 587,
|
56
59
|
'smtp_server' => 'localhost',
|
57
60
|
'smtp_user' => 'ydim@ywesee.com',
|
58
|
-
'vat_rate' =>
|
61
|
+
'vat_rate' => 8.0,
|
59
62
|
}
|
60
63
|
config = RCLConf::RCLConf.new(ARGV, defaults)
|
61
64
|
config.load(config.config)
|
@@ -120,7 +123,7 @@ module YDIM
|
|
120
123
|
@sessions = []
|
121
124
|
end
|
122
125
|
def login(client, name=nil, &block)
|
123
|
-
@serv.logger.debug(client.__drburi) {
|
126
|
+
@serv.logger.debug(client.__drburi) { "attempting login" }
|
124
127
|
session = @serv.auth_server.authenticate(name, &block)
|
125
128
|
session.serv = @serv
|
126
129
|
session.client = client
|
data/lib/ydim/version.rb
ADDED
data/readme.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# ydim
|
2
|
+
|
3
|
+
* https://github.com/zdavatz/ydim.git
|
4
|
+
|
5
|
+
## DESCRIPTION:
|
6
|
+
|
7
|
+
ywesee distributed invoice manager, Ruby
|
8
|
+
|
9
|
+
## INSTALL:
|
10
|
+
|
11
|
+
* gem install ydim
|
12
|
+
|
13
|
+
## Migrating an old database
|
14
|
+
|
15
|
+
An old database can be migrated to UTF-8 by calling
|
16
|
+
|
17
|
+
bundle install --path vendor
|
18
|
+
bundle exec bin/migrate_to_utf_8
|
19
|
+
|
20
|
+
## DEVELOPERS:
|
21
|
+
|
22
|
+
* Masaomi Hatakeyama
|
23
|
+
* Zeno R.R. Davatz
|
24
|
+
* Hannes Wyss (up to Version 1.0)
|
25
|
+
* Niklaus Giger (ported to Ruby 2.3.0)
|
26
|
+
|
27
|
+
## LICENSE:
|
28
|
+
|
29
|
+
* GPLv2
|
@@ -0,0 +1,440 @@
|
|
1
|
+
--
|
2
|
+
-- PostgreSQL database dump
|
3
|
+
--
|
4
|
+
|
5
|
+
SET statement_timeout = 0;
|
6
|
+
SET client_encoding = 'UTF8';
|
7
|
+
SET standard_conforming_strings = off;
|
8
|
+
SET check_function_bodies = false;
|
9
|
+
SET client_min_messages = warning;
|
10
|
+
SET escape_string_warning = off;
|
11
|
+
|
12
|
+
--
|
13
|
+
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
|
14
|
+
--
|
15
|
+
|
16
|
+
CREATE PROCEDURAL LANGUAGE plpgsql;
|
17
|
+
|
18
|
+
|
19
|
+
ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres;
|
20
|
+
|
21
|
+
SET search_path = public, pg_catalog;
|
22
|
+
|
23
|
+
--
|
24
|
+
-- Name: plpgsql_call_handler(); Type: FUNCTION; Schema: public; Owner: postgres
|
25
|
+
--
|
26
|
+
|
27
|
+
CREATE FUNCTION plpgsql_call_handler() RETURNS language_handler
|
28
|
+
LANGUAGE c
|
29
|
+
AS '$libdir/plpgsql', 'plpgsql_call_handler';
|
30
|
+
|
31
|
+
|
32
|
+
ALTER FUNCTION public.plpgsql_call_handler() OWNER TO postgres;
|
33
|
+
|
34
|
+
SET default_tablespace = '';
|
35
|
+
|
36
|
+
SET default_with_oids = true;
|
37
|
+
|
38
|
+
--
|
39
|
+
-- Name: collection; Type: TABLE; Schema: public; Owner: ydim; Tablespace:
|
40
|
+
--
|
41
|
+
|
42
|
+
CREATE TABLE collection (
|
43
|
+
odba_id integer NOT NULL,
|
44
|
+
key text NOT NULL,
|
45
|
+
value text
|
46
|
+
);
|
47
|
+
|
48
|
+
|
49
|
+
ALTER TABLE public.collection OWNER TO ydim;
|
50
|
+
|
51
|
+
--
|
52
|
+
-- Name: object; Type: TABLE; Schema: public; Owner: ydim; Tablespace:
|
53
|
+
--
|
54
|
+
|
55
|
+
CREATE TABLE object (
|
56
|
+
odba_id integer NOT NULL,
|
57
|
+
content text,
|
58
|
+
name text,
|
59
|
+
prefetchable boolean,
|
60
|
+
extent text
|
61
|
+
);
|
62
|
+
|
63
|
+
|
64
|
+
ALTER TABLE public.object OWNER TO ydim;
|
65
|
+
|
66
|
+
--
|
67
|
+
-- Name: object_connection; Type: TABLE; Schema: public; Owner: ydim; Tablespace:
|
68
|
+
--
|
69
|
+
|
70
|
+
CREATE TABLE object_connection (
|
71
|
+
origin_id integer NOT NULL,
|
72
|
+
target_id integer NOT NULL
|
73
|
+
);
|
74
|
+
|
75
|
+
|
76
|
+
ALTER TABLE public.object_connection OWNER TO ydim;
|
77
|
+
|
78
|
+
--
|
79
|
+
-- Name: ydim_autoinvoice_unique_id; Type: TABLE; Schema: public; Owner: ydim; Tablespace:
|
80
|
+
--
|
81
|
+
|
82
|
+
CREATE TABLE ydim_autoinvoice_unique_id (
|
83
|
+
origin_id integer,
|
84
|
+
search_term text,
|
85
|
+
target_id integer
|
86
|
+
);
|
87
|
+
|
88
|
+
|
89
|
+
ALTER TABLE public.ydim_autoinvoice_unique_id OWNER TO ydim;
|
90
|
+
|
91
|
+
--
|
92
|
+
-- Name: ydim_debitor_email; Type: TABLE; Schema: public; Owner: ydim; Tablespace:
|
93
|
+
--
|
94
|
+
|
95
|
+
CREATE TABLE ydim_debitor_email (
|
96
|
+
origin_id integer,
|
97
|
+
search_term text,
|
98
|
+
target_id integer
|
99
|
+
);
|
100
|
+
|
101
|
+
|
102
|
+
ALTER TABLE public.ydim_debitor_email OWNER TO ydim;
|
103
|
+
|
104
|
+
--
|
105
|
+
-- Name: ydim_debitor_name; Type: TABLE; Schema: public; Owner: ydim; Tablespace:
|
106
|
+
--
|
107
|
+
|
108
|
+
CREATE TABLE ydim_debitor_name (
|
109
|
+
origin_id integer,
|
110
|
+
search_term text,
|
111
|
+
target_id integer
|
112
|
+
);
|
113
|
+
|
114
|
+
|
115
|
+
ALTER TABLE public.ydim_debitor_name OWNER TO ydim;
|
116
|
+
|
117
|
+
--
|
118
|
+
-- Name: ydim_debitor_unique_id; Type: TABLE; Schema: public; Owner: ydim; Tablespace:
|
119
|
+
--
|
120
|
+
|
121
|
+
CREATE TABLE ydim_debitor_unique_id (
|
122
|
+
origin_id integer,
|
123
|
+
search_term text,
|
124
|
+
target_id integer
|
125
|
+
);
|
126
|
+
|
127
|
+
|
128
|
+
ALTER TABLE public.ydim_debitor_unique_id OWNER TO ydim;
|
129
|
+
|
130
|
+
--
|
131
|
+
-- Name: ydim_invoice_status; Type: TABLE; Schema: public; Owner: ydim; Tablespace:
|
132
|
+
--
|
133
|
+
|
134
|
+
CREATE TABLE ydim_invoice_status (
|
135
|
+
origin_id integer,
|
136
|
+
search_term text,
|
137
|
+
target_id integer
|
138
|
+
);
|
139
|
+
|
140
|
+
|
141
|
+
ALTER TABLE public.ydim_invoice_status OWNER TO ydim;
|
142
|
+
|
143
|
+
--
|
144
|
+
-- Name: ydim_invoice_unique_id; Type: TABLE; Schema: public; Owner: ydim; Tablespace:
|
145
|
+
--
|
146
|
+
|
147
|
+
CREATE TABLE ydim_invoice_unique_id (
|
148
|
+
origin_id integer,
|
149
|
+
search_term text,
|
150
|
+
target_id integer
|
151
|
+
);
|
152
|
+
|
153
|
+
|
154
|
+
ALTER TABLE public.ydim_invoice_unique_id OWNER TO ydim;
|
155
|
+
|
156
|
+
--
|
157
|
+
-- Data for Name: collection; Type: TABLE DATA; Schema: public; Owner: ydim
|
158
|
+
--
|
159
|
+
|
160
|
+
COPY collection (odba_id, key, value) FROM stdin;
|
161
|
+
2 0408221f7964696d5f6175746f696e766f6963655f756e697175655f6964 04086f3a0f4f4442413a3a53747562083a10406f6462615f636c61737363104f4442413a3a496e6465783a0d406f6462615f69646902dc013a14406f6462615f636f6e7461696e657230
|
162
|
+
2 040822177964696d5f64656269746f725f656d61696c 04086f3a0f4f4442413a3a53747562083a0d406f6462615f6964690296023a10406f6462615f636c61737363104f4442413a3a496e6465783a14406f6462615f636f6e7461696e657230
|
163
|
+
2 040822167964696d5f64656269746f725f6e616d65 04086f3a0f4f4442413a3a53747562083a0d406f6462615f6964690297023a10406f6462615f636c61737363104f4442413a3a496e6465783a14406f6462615f636f6e7461696e657230
|
164
|
+
2 0408221b7964696d5f64656269746f725f756e697175655f6964 04086f3a0f4f4442413a3a53747562083a0d406f6462615f6964690298023a10406f6462615f636c61737363104f4442413a3a496e6465783a14406f6462615f636f6e7461696e657230
|
165
|
+
2 040822187964696d5f696e766f6963655f737461747573 04086f3a0f4f4442413a3a53747562083a0d406f6462615f6964690299023a10406f6462615f636c61737363104f4442413a3a496e6465783a14406f6462615f636f6e7461696e657230
|
166
|
+
2 0408221b7964696d5f696e766f6963655f756e697175655f6964 04086f3a0f4f4442413a3a53747562083a0d406f6462615f696469029a023a10406f6462615f636c61737363104f4442413a3a496e6465783a14406f6462615f636f6e7461696e657230
|
167
|
+
\.
|
168
|
+
|
169
|
+
|
170
|
+
--
|
171
|
+
-- Data for Name: object; Type: TABLE DATA; Schema: public; Owner: ydim
|
172
|
+
--
|
173
|
+
|
174
|
+
COPY object (odba_id, content, name, prefetchable, extent) FROM stdin;
|
175
|
+
2 0408497b00093a0d406f6462615f696469073a14406f6462615f6f6273657276657273303a0f406f6462615f6e616d65221d5f5f63616368655f7365727665725f696e64696365735f5f3a15406f6462615f70657273697374656e7454 __cache_server_indices__ f Hash
|
176
|
+
662 04086f3a104f4442413a3a496e6465780f3a0d406f6462615f6964690296023a1040696e6465785f6e616d6522177964696d5f64656269746f725f656d61696c3a14406f6462615f6f6273657276657273303a14407265736f6c76655f6f726967696e22003a104064696374696f6e61727922003a15406f6462615f70657273697374656e74543a12407461726765745f6b6c61737363125944494d3a3a44656269746f723a114070726f635f6f726967696e303a19407265736f6c76655f7365617263685f7465726d3a0a656d61696c3a12406f726967696e5f6b6c6173734009 \N f ODBA::Index
|
177
|
+
663 04086f3a104f4442413a3a496e6465780f3a0d406f6462615f6964690297023a1040696e6465785f6e616d6522167964696d5f64656269746f725f6e616d653a14406f6462615f6f6273657276657273303a14407265736f6c76655f6f726967696e22003a104064696374696f6e61727922003a15406f6462615f70657273697374656e74543a12407461726765745f6b6c61737363125944494d3a3a44656269746f723a114070726f635f6f726967696e303a19407265736f6c76655f7365617263685f7465726d3a096e616d653a12406f726967696e5f6b6c6173734009 \N f ODBA::Index
|
178
|
+
664 04086f3a104f4442413a3a496e6465780f3a0d406f6462615f6964690298023a1040696e6465785f6e616d65221b7964696d5f64656269746f725f756e697175655f69643a14406f6462615f6f6273657276657273303a14407265736f6c76655f6f726967696e22003a104064696374696f6e61727922003a15406f6462615f70657273697374656e74543a12407461726765745f6b6c61737363125944494d3a3a44656269746f723a114070726f635f6f726967696e303a19407265736f6c76655f7365617263685f7465726d3a0e756e697175655f69643a12406f726967696e5f6b6c6173734009 \N f ODBA::Index
|
179
|
+
665 04086f3a104f4442413a3a496e646578123a114070726f635f746172676574303a1040696e6465785f6e616d6522187964696d5f696e766f6963655f7374617475733a0d406f6462615f6964690299023a12406f726967696e5f6b6c61737363125944494d3a3a496e766f6963653a14406f6462615f6f6273657276657273303a114070726f635f6f726967696e303a1240636c6173735f66696c7465723a11696e7374616e63655f6f663f3a15406f6462615f70657273697374656e74543a104064696374696f6e61727922003a14407265736f6c76655f6f726967696e22003a1e4070726f635f7265736f6c76655f7365617263685f7465726d303a19407265736f6c76655f7365617263685f7465726d3a0b7374617475733a12407461726765745f6b6c6173734007 \N f ODBA::Index
|
180
|
+
666 04086f3a104f4442413a3a496e646578123a114070726f635f746172676574303a1040696e6465785f6e616d65221b7964696d5f696e766f6963655f756e697175655f69643a0d406f6462615f696469029a023a12406f726967696e5f6b6c61737363125944494d3a3a496e766f6963653a14406f6462615f6f6273657276657273303a114070726f635f6f726967696e303a1240636c6173735f66696c7465723a11696e7374616e63655f6f663f3a15406f6462615f70657273697374656e74543a104064696374696f6e61727922003a14407265736f6c76655f6f726967696e22003a1e4070726f635f7265736f6c76655f7365617263685f7465726d303a19407265736f6c76655f7365617263685f7465726d3a0e756e697175655f69643a12407461726765745f6b6c6173734007 \N f ODBA::Index
|
181
|
+
476 04086f3a104f4442413a3a496e646578123a114070726f635f746172676574303a1040696e6465785f6e616d65221f7964696d5f6175746f696e766f6963655f756e697175655f69643a12406f726967696e5f6b6c61737363165944494d3a3a4175746f496e766f6963653a0d406f6462615f69646902dc013a114070726f635f6f726967696e303a14406f6462615f6f6273657276657273303a1240636c6173735f66696c7465723a11696e7374616e63655f6f663f3a15406f6462615f70657273697374656e74543a104064696374696f6e61727922003a14407265736f6c76655f6f726967696e22003a1e4070726f635f7265736f6c76655f7365617263685f7465726d303a19407265736f6c76655f7365617263685f7465726d3a0e756e697175655f69643a12407461726765745f6b6c6173734007 \N f ODBA::Index
|
182
|
+
\.
|
183
|
+
|
184
|
+
|
185
|
+
--
|
186
|
+
-- Data for Name: object_connection; Type: TABLE DATA; Schema: public; Owner: ydim
|
187
|
+
--
|
188
|
+
|
189
|
+
COPY object_connection (origin_id, target_id) FROM stdin;
|
190
|
+
\.
|
191
|
+
|
192
|
+
|
193
|
+
--
|
194
|
+
-- Data for Name: ydim_autoinvoice_unique_id; Type: TABLE DATA; Schema: public; Owner: ydim
|
195
|
+
--
|
196
|
+
|
197
|
+
COPY ydim_autoinvoice_unique_id (origin_id, search_term, target_id) FROM stdin;
|
198
|
+
\.
|
199
|
+
|
200
|
+
|
201
|
+
--
|
202
|
+
-- Data for Name: ydim_debitor_email; Type: TABLE DATA; Schema: public; Owner: ydim
|
203
|
+
--
|
204
|
+
|
205
|
+
COPY ydim_debitor_email (origin_id, search_term, target_id) FROM stdin;
|
206
|
+
\.
|
207
|
+
|
208
|
+
|
209
|
+
--
|
210
|
+
-- Data for Name: ydim_debitor_name; Type: TABLE DATA; Schema: public; Owner: ydim
|
211
|
+
--
|
212
|
+
|
213
|
+
COPY ydim_debitor_name (origin_id, search_term, target_id) FROM stdin;
|
214
|
+
\.
|
215
|
+
|
216
|
+
|
217
|
+
--
|
218
|
+
-- Data for Name: ydim_debitor_unique_id; Type: TABLE DATA; Schema: public; Owner: ydim
|
219
|
+
--
|
220
|
+
|
221
|
+
COPY ydim_debitor_unique_id (origin_id, search_term, target_id) FROM stdin;
|
222
|
+
\.
|
223
|
+
|
224
|
+
|
225
|
+
--
|
226
|
+
-- Data for Name: ydim_invoice_status; Type: TABLE DATA; Schema: public; Owner: ydim
|
227
|
+
--
|
228
|
+
|
229
|
+
COPY ydim_invoice_status (origin_id, search_term, target_id) FROM stdin;
|
230
|
+
\.
|
231
|
+
|
232
|
+
|
233
|
+
--
|
234
|
+
-- Data for Name: ydim_invoice_unique_id; Type: TABLE DATA; Schema: public; Owner: ydim
|
235
|
+
--
|
236
|
+
|
237
|
+
COPY ydim_invoice_unique_id (origin_id, search_term, target_id) FROM stdin;
|
238
|
+
\.
|
239
|
+
|
240
|
+
|
241
|
+
--
|
242
|
+
-- Name: collection_pkey; Type: CONSTRAINT; Schema: public; Owner: ydim; Tablespace:
|
243
|
+
--
|
244
|
+
|
245
|
+
ALTER TABLE ONLY collection
|
246
|
+
ADD CONSTRAINT collection_pkey PRIMARY KEY (odba_id, key);
|
247
|
+
|
248
|
+
|
249
|
+
--
|
250
|
+
-- Name: object_connection_pkey; Type: CONSTRAINT; Schema: public; Owner: ydim; Tablespace:
|
251
|
+
--
|
252
|
+
|
253
|
+
ALTER TABLE ONLY object_connection
|
254
|
+
ADD CONSTRAINT object_connection_pkey PRIMARY KEY (origin_id, target_id);
|
255
|
+
|
256
|
+
|
257
|
+
--
|
258
|
+
-- Name: object_name_key; Type: CONSTRAINT; Schema: public; Owner: ydim; Tablespace:
|
259
|
+
--
|
260
|
+
|
261
|
+
ALTER TABLE ONLY object
|
262
|
+
ADD CONSTRAINT object_name_key UNIQUE (name);
|
263
|
+
|
264
|
+
|
265
|
+
--
|
266
|
+
-- Name: object_pkey; Type: CONSTRAINT; Schema: public; Owner: ydim; Tablespace:
|
267
|
+
--
|
268
|
+
|
269
|
+
ALTER TABLE ONLY object
|
270
|
+
ADD CONSTRAINT object_pkey PRIMARY KEY (odba_id);
|
271
|
+
|
272
|
+
|
273
|
+
--
|
274
|
+
-- Name: extent_index; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
275
|
+
--
|
276
|
+
|
277
|
+
CREATE INDEX extent_index ON object USING btree (extent);
|
278
|
+
|
279
|
+
|
280
|
+
--
|
281
|
+
-- Name: origin_id_index; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
282
|
+
--
|
283
|
+
|
284
|
+
CREATE INDEX origin_id_index ON object_connection USING btree (origin_id);
|
285
|
+
|
286
|
+
|
287
|
+
--
|
288
|
+
-- Name: origin_id_ydim_autoinvoice_unique_id; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
289
|
+
--
|
290
|
+
|
291
|
+
CREATE INDEX origin_id_ydim_autoinvoice_unique_id ON ydim_autoinvoice_unique_id USING btree (origin_id);
|
292
|
+
|
293
|
+
|
294
|
+
--
|
295
|
+
-- Name: origin_id_ydim_debitor_email; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
296
|
+
--
|
297
|
+
|
298
|
+
CREATE INDEX origin_id_ydim_debitor_email ON ydim_debitor_email USING btree (origin_id);
|
299
|
+
|
300
|
+
|
301
|
+
--
|
302
|
+
-- Name: origin_id_ydim_debitor_name; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
303
|
+
--
|
304
|
+
|
305
|
+
CREATE INDEX origin_id_ydim_debitor_name ON ydim_debitor_name USING btree (origin_id);
|
306
|
+
|
307
|
+
|
308
|
+
--
|
309
|
+
-- Name: origin_id_ydim_debitor_unique_id; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
310
|
+
--
|
311
|
+
|
312
|
+
CREATE INDEX origin_id_ydim_debitor_unique_id ON ydim_debitor_unique_id USING btree (origin_id);
|
313
|
+
|
314
|
+
|
315
|
+
--
|
316
|
+
-- Name: origin_id_ydim_invoice_status; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
317
|
+
--
|
318
|
+
|
319
|
+
CREATE INDEX origin_id_ydim_invoice_status ON ydim_invoice_status USING btree (origin_id);
|
320
|
+
|
321
|
+
|
322
|
+
--
|
323
|
+
-- Name: origin_id_ydim_invoice_unique_id; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
324
|
+
--
|
325
|
+
|
326
|
+
CREATE INDEX origin_id_ydim_invoice_unique_id ON ydim_invoice_unique_id USING btree (origin_id);
|
327
|
+
|
328
|
+
|
329
|
+
--
|
330
|
+
-- Name: prefetchable_index; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
331
|
+
--
|
332
|
+
|
333
|
+
CREATE INDEX prefetchable_index ON object USING btree (prefetchable);
|
334
|
+
|
335
|
+
|
336
|
+
--
|
337
|
+
-- Name: search_term_ydim_autoinvoice_unique_id; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
338
|
+
--
|
339
|
+
|
340
|
+
CREATE INDEX search_term_ydim_autoinvoice_unique_id ON ydim_autoinvoice_unique_id USING btree (search_term);
|
341
|
+
|
342
|
+
|
343
|
+
--
|
344
|
+
-- Name: search_term_ydim_debitor_email; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
345
|
+
--
|
346
|
+
|
347
|
+
CREATE INDEX search_term_ydim_debitor_email ON ydim_debitor_email USING btree (search_term);
|
348
|
+
|
349
|
+
|
350
|
+
--
|
351
|
+
-- Name: search_term_ydim_debitor_name; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
352
|
+
--
|
353
|
+
|
354
|
+
CREATE INDEX search_term_ydim_debitor_name ON ydim_debitor_name USING btree (search_term);
|
355
|
+
|
356
|
+
|
357
|
+
--
|
358
|
+
-- Name: search_term_ydim_debitor_unique_id; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
359
|
+
--
|
360
|
+
|
361
|
+
CREATE INDEX search_term_ydim_debitor_unique_id ON ydim_debitor_unique_id USING btree (search_term);
|
362
|
+
|
363
|
+
|
364
|
+
--
|
365
|
+
-- Name: search_term_ydim_invoice_status; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
366
|
+
--
|
367
|
+
|
368
|
+
CREATE INDEX search_term_ydim_invoice_status ON ydim_invoice_status USING btree (search_term);
|
369
|
+
|
370
|
+
|
371
|
+
--
|
372
|
+
-- Name: search_term_ydim_invoice_unique_id; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
373
|
+
--
|
374
|
+
|
375
|
+
CREATE INDEX search_term_ydim_invoice_unique_id ON ydim_invoice_unique_id USING btree (search_term);
|
376
|
+
|
377
|
+
|
378
|
+
--
|
379
|
+
-- Name: target_id_index; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
380
|
+
--
|
381
|
+
|
382
|
+
CREATE INDEX target_id_index ON object_connection USING btree (target_id);
|
383
|
+
|
384
|
+
|
385
|
+
--
|
386
|
+
-- Name: target_id_ydim_autoinvoice_unique_id; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
387
|
+
--
|
388
|
+
|
389
|
+
CREATE INDEX target_id_ydim_autoinvoice_unique_id ON ydim_autoinvoice_unique_id USING btree (target_id);
|
390
|
+
|
391
|
+
|
392
|
+
--
|
393
|
+
-- Name: target_id_ydim_debitor_email; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
394
|
+
--
|
395
|
+
|
396
|
+
CREATE INDEX target_id_ydim_debitor_email ON ydim_debitor_email USING btree (target_id);
|
397
|
+
|
398
|
+
|
399
|
+
--
|
400
|
+
-- Name: target_id_ydim_debitor_name; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
401
|
+
--
|
402
|
+
|
403
|
+
CREATE INDEX target_id_ydim_debitor_name ON ydim_debitor_name USING btree (target_id);
|
404
|
+
|
405
|
+
|
406
|
+
--
|
407
|
+
-- Name: target_id_ydim_debitor_unique_id; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
408
|
+
--
|
409
|
+
|
410
|
+
CREATE INDEX target_id_ydim_debitor_unique_id ON ydim_debitor_unique_id USING btree (target_id);
|
411
|
+
|
412
|
+
|
413
|
+
--
|
414
|
+
-- Name: target_id_ydim_invoice_status; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
415
|
+
--
|
416
|
+
|
417
|
+
CREATE INDEX target_id_ydim_invoice_status ON ydim_invoice_status USING btree (target_id);
|
418
|
+
|
419
|
+
|
420
|
+
--
|
421
|
+
-- Name: target_id_ydim_invoice_unique_id; Type: INDEX; Schema: public; Owner: ydim; Tablespace:
|
422
|
+
--
|
423
|
+
|
424
|
+
CREATE INDEX target_id_ydim_invoice_unique_id ON ydim_invoice_unique_id USING btree (target_id);
|
425
|
+
|
426
|
+
|
427
|
+
--
|
428
|
+
-- Name: public; Type: ACL; Schema: -; Owner: postgres
|
429
|
+
--
|
430
|
+
|
431
|
+
REVOKE ALL ON SCHEMA public FROM PUBLIC;
|
432
|
+
REVOKE ALL ON SCHEMA public FROM postgres;
|
433
|
+
GRANT ALL ON SCHEMA public TO postgres;
|
434
|
+
GRANT ALL ON SCHEMA public TO PUBLIC;
|
435
|
+
|
436
|
+
|
437
|
+
--
|
438
|
+
-- PostgreSQL database dump complete
|
439
|
+
--
|
440
|
+
|