/[fcproducts]/Create.sql
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /Create.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Wed Jun 6 08:37:01 2001 UTC (18 years, 3 months ago) by ravilov
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Mijenjanje product-a, logout...

1 DROP TABLE "user_product";
2 DROP TABLE "products";
3 DROP SEQUENCE "products_product_id_seq";
4 DROP TABLE "users";
5 DROP PROCEDURAL LANGUAGE 'plpgsql';
6 DROP FUNCTION "plpgsql_call_handler" ();
7
8 CREATE FUNCTION "plpgsql_call_handler" () RETURNS opaque AS '/usr/lib/postgresql/lib/plpgsql.so', 'plpgsql_call_handler' LANGUAGE 'C';
9
10 CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER "plpgsql_call_handler" LANCOMPILER 'PL/pgSQL';
11
12 CREATE TABLE "users" (
13 "login" character varying(16) NOT NULL,
14 "password" character varying(16),
15 "full_name" character varying(150),
16 "email" character varying(200),
17 Constraint "users_pkey" Primary Key ("login")
18 );
19
20 CREATE SEQUENCE "products_product_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
21
22 CREATE TABLE "products" (
23 "product_id" integer DEFAULT nextval('"products_product_id_seq"'::text) NOT NULL,
24 "naziv" character varying(50),
25 "link_market" character varying(50),
26 "link_competition" character varying(50),
27 "link_quality" character varying(50),
28 "link_production" character varying(50),
29 "link_potential" character varying(50),
30 "link_dosage" character varying(50),
31 "link_purchasing" character varying(50),
32 "link_economics" character varying(50),
33 "link_sales" character varying(50),
34 "link_risks" character varying(50),
35 "comment" character varying(250),
36 "cust_potential" character varying(10) DEFAULT '' NOT NULL,
37 "cust_existing" character varying(10) DEFAULT '' NOT NULL,
38 "fc_price" character varying(100) DEFAULT '' NOT NULL,
39 "competitors" character varying(100) DEFAULT '' NOT NULL,
40 "holders" character varying(100) DEFAULT '' NOT NULL,
41 "market_size" character varying(100) DEFAULT '' NOT NULL,
42 "quality" character varying(100) DEFAULT '' NOT NULL,
43 "registrations" character varying(100) DEFAULT '' NOT NULL,
44 "last_fda" character varying(100) DEFAULT '' NOT NULL,
45 "cap_nominal" character varying(100) DEFAULT '' NOT NULL,
46 "cap_util" character varying(100) DEFAULT '' NOT NULL,
47 "ther_class" character varying(100) DEFAULT '' NOT NULL,
48 "indication" character varying(100) DEFAULT '' NOT NULL,
49 "sales_1999" character varying(100) DEFAULT '' NOT NULL,
50 "launch_year" character varying(100) DEFAULT '' NOT NULL,
51 "mat_raw" character varying(100) DEFAULT '' NOT NULL,
52 "suppliers" character varying(100) DEFAULT '' NOT NULL,
53 "mat_cost" character varying(100) DEFAULT '' NOT NULL,
54 "fc_rank" character varying(100) DEFAULT '' NOT NULL,
55 "fc_share" character varying(100) DEFAULT '' NOT NULL,
56 "maturity" character varying(100) DEFAULT '' NOT NULL,
57 "comp_intensity" character varying(100) DEFAULT '' NOT NULL,
58 "comp_position" character varying(100) DEFAULT '' NOT NULL,
59 "cogs" character varying(100) DEFAULT '' NOT NULL,
60 "op_income" character varying(100) DEFAULT '' NOT NULL,
61 "break_even" character varying(100) DEFAULT '' NOT NULL,
62 "m3" character varying(100) DEFAULT '' NOT NULL,
63 "sales_img" character varying(100) DEFAULT '' NOT NULL,
64 "risks" character varying(100) DEFAULT '' NOT NULL,
65 Constraint "products_pkey" Primary Key ("product_id")
66 );
67
68 CREATE TABLE "user_product" (
69 "login" character varying(16) NOT NULL,
70 "product_id" bigint DEFAULT 0 NOT NULL,
71 "market" boolean,
72 "production" boolean,
73 "purchasing" boolean,
74 "economics" boolean,
75 "risks" boolean,
76 "competition" boolean,
77 "potential" boolean,
78 "portfolio" boolean,
79 "sales" boolean,
80 "quality" boolean,
81 "dosage" boolean,
82 "evaluation" boolean,
83 "comment" boolean,
84 Constraint "user_product_pkey" Primary Key ("login", "product_id")
85 );
86
87
88 COPY "users" FROM stdin;
89 dpavlin pero99 Dobrica Pavlinusic dpavlin@pliva.hr
90 test test
91 test2
92 \.
93
94 COPY "products" FROM stdin;
95 1 5 Acetylsalicylamide \N \N \N \N \N \N \N \N \N \N \N
96 \.
97
98 COPY "user_product" FROM stdin;
99 dpavlin 1 t t t t \N f \N f f t t \N t
100 test2 1 t t t t t t t t t t t t t
101 test 1 \N \N \N \N \N \N \N \N \N \N \N \N \N
102 \.
103
104 SELECT setval ('"products_product_id_seq"', 1, 't');
105

  ViewVC Help
Powered by ViewVC 1.1.26