Initial import
This commit is contained in:
parent
0c865416ca
commit
04804b89a9
279 changed files with 12945 additions and 0 deletions
28
NpgsqlMRPProviders/Sql/ProfileData.sql
Normal file
28
NpgsqlMRPProviders/Sql/ProfileData.sql
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
-- Table: profiledata
|
||||
|
||||
-- DROP TABLE profiledata;
|
||||
|
||||
CREATE TABLE profiledata
|
||||
(
|
||||
uniqueid integer,
|
||||
zipcode character varying(10),
|
||||
cityandstate character varying(255),
|
||||
avatar bytea,
|
||||
CONSTRAINT fkprofiles2 FOREIGN KEY (uniqueid)
|
||||
REFERENCES profiles (uniqueid) MATCH SIMPLE
|
||||
ON UPDATE CASCADE ON DELETE CASCADE
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
);
|
||||
|
||||
-- Index: fki_fkprofiles2
|
||||
|
||||
-- DROP INDEX fki_fkprofiles2;
|
||||
|
||||
CREATE INDEX fki_fkprofiles2
|
||||
ON profiledata
|
||||
USING btree
|
||||
(uniqueid );
|
||||
|
||||
|
||||
18
NpgsqlMRPProviders/Sql/RolesTable.sql
Normal file
18
NpgsqlMRPProviders/Sql/RolesTable.sql
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
-- Table: roles
|
||||
|
||||
-- DROP TABLE roles;
|
||||
|
||||
CREATE TABLE roles
|
||||
(
|
||||
rolename character varying(255) NOT NULL,
|
||||
applicationname character varying(255) NOT NULL,
|
||||
comment character varying(255) NOT NULL,
|
||||
CONSTRAINT roles_pkey PRIMARY KEY (rolename , applicationname )
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
);
|
||||
|
||||
COMMENT ON TABLE roles
|
||||
IS 'Web application roles';
|
||||
|
||||
16
NpgsqlMRPProviders/Sql/StockSymbols.sql
Normal file
16
NpgsqlMRPProviders/Sql/StockSymbols.sql
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
-- Table: stocksymbols
|
||||
|
||||
-- DROP TABLE stocksymbols;
|
||||
|
||||
CREATE TABLE stocksymbols
|
||||
(
|
||||
uniqueid integer,
|
||||
stocksymbol character varying(10),
|
||||
CONSTRAINT fkprofiles1 FOREIGN KEY (uniqueid)
|
||||
REFERENCES profiles (uniqueid) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
);
|
||||
21
NpgsqlMRPProviders/Sql/UserRoleTable.sql
Normal file
21
NpgsqlMRPProviders/Sql/UserRoleTable.sql
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
-- Table: usersroles
|
||||
|
||||
-- DROP TABLE usersroles;
|
||||
|
||||
CREATE TABLE usersroles
|
||||
(
|
||||
applicationname character varying(255) NOT NULL,
|
||||
rolename character varying(255) NOT NULL,
|
||||
username character varying(255) NOT NULL,
|
||||
CONSTRAINT attrroles_pkey PRIMARY KEY (applicationname , rolename , username ),
|
||||
CONSTRAINT usersroles_fk_role FOREIGN KEY (applicationname, rolename)
|
||||
REFERENCES roles (applicationname, rolename) MATCH SIMPLE
|
||||
ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
CONSTRAINT usersroles_fk_user FOREIGN KEY (applicationname, username)
|
||||
REFERENCES users (applicationname, username) MATCH SIMPLE
|
||||
ON UPDATE CASCADE ON DELETE CASCADE
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
);
|
||||
19
NpgsqlMRPProviders/Sql/UsersTable.sql
Normal file
19
NpgsqlMRPProviders/Sql/UsersTable.sql
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
-- Table: profiles
|
||||
|
||||
-- DROP TABLE profiles;
|
||||
|
||||
CREATE TABLE profiles
|
||||
(
|
||||
uniqueid bigserial NOT NULL,
|
||||
username character varying(255) NOT NULL,
|
||||
applicationname character varying(255) NOT NULL,
|
||||
isanonymous boolean,
|
||||
lastactivitydate timestamp with time zone,
|
||||
lastupdateddate timestamp with time zone,
|
||||
CONSTRAINT profiles_pkey PRIMARY KEY (uniqueid ),
|
||||
CONSTRAINT pkprofiles UNIQUE (username , applicationname )
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
);
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue