CREATE TABLE password_reset (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
username VARCHAR(35) NOT NULL ,
status INT DEFAULT 0,
added timestamp without time zone DEFAULT now(),
updated timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY password_reset
ADD CONSTRAINT password_reset_id_key UNIQUE (id);
CREATE TABLE members_pending (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
firstname VARCHAR(35) NOT NULL,
lastname VARCHAR(35) NOT NULL,
email VARCHAR(35) NOT NULL ,
status INT DEFAULT 0,
added timestamp without time zone DEFAULT now(),
updated timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY members_pending
ADD CONSTRAINT members_pending_id_key UNIQUE (id);
CREATE TABLE members (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
username VARCHAR(25) UNIQUE NOT NULL,
password VARCHAR(250) NOT NULL,
loc INET,
status INT DEFAULT 0,
added timestamp without time zone DEFAULT now(),
updated timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY members
ADD CONSTRAINT members_id_key UNIQUE (id);
ALTER TABLE members ADD email VARCHAR(100);
ALTER TABLE members ADD account_name VARCHAR(100);
ALTER TABLE members ADD firstname VARCHAR(25);
ALTER TABLE members ADD lastname VARCHAR(25);
ALTER TABLE members ALTER COLUMN password TYPE VARCHAR(250);
ALTER TABLE members ADD country VARCHAR(3);
ALTER TABLE members ADD stripe_customer_id VARCHAR(100)
ALTER TABLE members ADD profile_completed timestamp without time zone DEFAULT NULL;
ALTER TABLE members ADD option_name VARCHAR(100) REFERENCES subscription_options(option_name);
ALTER TABLE members ADD next_billing timestamp without time zone;
ALTER TABLE members ADD trial_end timestamp without time zone;
-- bALTER TABLE members ADD option_name VARCHAR(100) REFERENCES subscription_options(option_name);
CREATE TABLE members_profile(
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
member_id INT REFERENCES members(id) UNIQUE NOT NULL,
practice VARCHAR(100) NOT NULL,
specialization VARCHAR(100) NOT NULL,
introduction TEXT,
added timestamp without time zone DEFAULT now(),
updated timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY members_profile
ADD CONSTRAINT members_members_profile_id_key UNIQUE (id);
ALTER TABLE members_profile OWNER TO merms_panel
ALTER TABLE members_profile ADD url_name VARCHAR(25);
-- UPDATE members SET account_name ='This is the account name';
-- UPDATE members SET firstname ='Firstname';
-- UPDATE members SET lastname ='Lastname';
CREATE TABLE members_session(
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
member_id INT REFERENCES members(id),
session_id VARCHAR(100) UNIQUE NOT NULL,
loc INET,
status INT DEFAULT 0,
added timestamp without time zone DEFAULT now(),
updated timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY members_session
ADD CONSTRAINT members_session_id_key UNIQUE (id);
CREATE TABLE products (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
product_id VARCHAR(25) UNIQUE NOT NULL,
name VARCHAR(100) UNIQUE NOT NULL,
description VARCHAR(250) NOT NULL,
status INT DEFAULT 0,
added timestamp without time zone DEFAULT now(),
updated timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY products
ADD CONSTRAINT products_id_key UNIQUE (id);
ALTER TABLE products ADD banner VARCHAR(100);
UPDATE products set banner = 'p'||id||'.jpg'
ALTER TABLE products ADD start_url VARCHAR(100);
--- DEVELOPMENT
UPDATE products SET start_url = 'A1.devprov.mermsemr.com' WHERE product_id = 'A000001';
UPDATE products SET start_url = 'A2.devprov.mermsemr.com' WHERE product_id = 'A000002';
UPDATE products SET start_url = 'A3.devprov.mermsemr.com' WHERE product_id = 'A000003';
UPDATE products SET start_url = 'A4.devprov.mermsemr.com' WHERE product_id = 'A000004';
UPDATE products SET start_url = 'A5.devprov.mermsemr.com' WHERE product_id = 'A000005';
--- PRODUCTION
UPDATE products SET start_url = '.pers.mermsemr.com' WHERE product_id = 'A000001';
UPDATE products SET start_url = '.prov.mermsemr.com' WHERE product_id = 'A000002';
UPDATE products SET start_url = 'p.forum.mermsemr.com' WHERE product_id = 'A000003';
UPDATE products SET start_url = 'v.forum.mermsemr.com' WHERE product_id = 'A000004';
UPDATE products SET start_url = '.ehr.mermsemr.com' WHERE product_id = 'A000005';
CREATE TABLE products_details (
id SERIAL,
product_id VARCHAR(25) UNIQUE REFERENCES products(product_id),
details TEXT,
sale_text TEXT,
added timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY products_details
ADD CONSTRAINT products_details_id_key UNIQUE (id);
CREATE TABLE member_product_refresh(
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
member_id INT REFERENCES members(id),
product_id VARCHAR(25) NOT NULL,
subscription_uid VARCHAR(100) NOT NULL,
status INT DEFAULT 0,
added timestamp without time zone DEFAULT now(),
updated timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY member_product_refresh
ADD CONSTRAINT member_product_refresh_id_key UNIQUE (id);
ALTER TABLE products_details OWNER TO merms_panel;
--- ALTER TABLE products_details ADD sale_text TEXT;
INSERT INTO products_details (product_id,details) VALUES(
'A000002',
'
A Professional Website service utilizing AI tools offers a comprehensive solution for individuals and businesses looking to establish a robust online presence. Here are some key features typically included in such a service:
1. **AI-Powered Design**: The service often employs AI algorithms to help create aesthetically pleasing and user-friendly designs. Users can enter their preferences and the tools will generate layout suggestions, color schemes, and typography that best match their brand identity.
2. **Content Generation**: With AI-driven content creation tools, users can receive assistance in writing engaging website copy, blog posts, and product descriptions. These tools can analyze successful content in similar industries and generate text that aligns with SEO best practices.
3. **SEO Optimization**: AI tools can help optimize websites for search engines by analyzing keywords, providing suggestions for improving visibility, and optimizing site architecture. This ensures that the website ranks well and attracts organic traffic.
4. **Chatbots for Customer Engagement**: Implementing AI chatbots allows businesses to provide instant support to visitors. These bots can answer common questions, guide users through the website, and enhance the overall customer experience.
5. **Analytics and Insights**: Advanced AI analytics can track user behavior, providing insights into how visitors interact with the site. This data helps businesses make informed decisions on improvements and marketing strategies.
6. **Personalization**: Using AI, websites can personalize user experiences based on behavior and preferences. This could include tailored recommendations, customized content, and targeted marketing campaigns that increase engagement.
7. **E-commerce Solutions**: For those looking to sell online, AI tools can optimize the shopping experience by providing product recommendations, personalized discounts, and streamlined check-out processes.
8. **Maintenance and Support**: Many services offer ongoing support and automatic updates using AI to monitor site performance, ensuring that the website runs smoothly and is protected against threats. By leveraging these AI tools, the Professional Website service can deliver not only visually appealing and functional websites but also enhance user engagement, improve operational efficiency, and drive growth for businesses.
'
);details
INSERT INTO products_details (product_id,details) VALUES ('A000002','
Elevate your online presence with a professional website service powered by cutting-edge AI tools. This all-inclusive solution empowers individuals and businesses to create a dynamic and impactful digital footprint. Key features of this service include powerful content generation, strategic SEO optimization, insightful analytics, personalized experiences, and much more.
Experience the transformative potential of a robust online platform that drives engagement and success!
'
);
INSERT INTO products_details (product_id,details) VALUES ('A000001', '
Establishing a powerful online presence is crucial in todays digital landscape. Our platform empowers you to effortlessly organize and manage every aspect of your website.
With our cutting-edge features, you will benefit from advanced SEO optimization that drives traffic, comprehensive analytics that provide valuable insights, and tailored experiences that engage your audience like never before.
Transform your online presence with us and unlock your full potential!
');
INSERT INTO products_details (product_id,details) VALUES ('A000003', '
Unlock your potential with your personalized sharing forum. We handle the platform management, allowing you to focus on impactful outreach and communication. Utilize our powerful tools to significantly expand your audience and amplify your message.
We are here to support you every step of the way in achieving your goals.
');
INSERT INTO products_details (product_id,details) VALUES ('A000004', '
Elevate your business online presence by launching an engaging forum where you can exchange ideas and information with your users. This forum will not only foster meaningful interactions but also serve as a vital point of connection for your clients.
We partner with you to implement automated engagements, streamline appointments, create valuable links, and much more, ensuring a seamless experience that drives your success.
');
INSERT INTO products_details (product_id,details) VALUES ('A000005', '
OpenEMR is the most popular open source electronic health records and medical practice management solution. OpenEMR is a community of passionate volunteers and contributors dedicated to guarding OpenEMR status as a free, open source software solution for medical practices with a commitment to openness, kindness and cooperation.
Activate to deploy OpenEMR for your practice
URL: https://www.open-emr.org/
');
UPDATE products_details SET details = '
Elevate your online presence with a professional website service powered by cutting-edge AI tools. This all-inclusive solution empowers individuals and businesses to create a dynamic and impactful digital footprint. ' ||
'
Experience the transformative potential of a robust online platform that drives engagement and success!
'
WHERE product_id = 'A000002';
INSERT INTO products_details (product_id,details) VALUES(
'A000001',
'
A Professional Website service utilizing AI tools offers a comprehensive solution for individuals and businesses looking to establish a robust online presence. Here are some key features typically included in such a service'
);
UPDATE products_details SET sale_text =
'
Start free for 6 months, and customize your product with additional features as you see fit. You''re in control-you can cancel anytime.
';
merms_panel=# select product_id,description from products;
product_id | description
------------+----------------------------------------------
A000002 | Your healthcare practice online presence
A000001 | Your personal professional web presence
A000003 | Blog to share your health care view
A000004 | Booster your practice with engaging contents
A000005 | Get Open EMR for practice management
(5 rows)
CREATE TABLE products_templates (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
product_id VARCHAR(25) REFERENCES products(product_id),
name VARCHAR(55) UNIQUE NOT NULL,
status INT DEFAULT 0,
owner_uid VARCHAR(100),
provision_name VARCHAR(250),
added timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY products_templates
ADD CONSTRAINT products_templates_id_key UNIQUE (id);
ALTER TABLE products_templates OWNER TO merms_panel;
INSERT INTO products_templates(product_id,name,provision_name,status)
VALUES(
'A000001',
'Template A01',
'registry.chiefsoft.com/pweb/pweb-01-merms-pweb0004:latest',
1);
INSERT INTO products_templates(product_id,name,provision_name,status)
VALUES(
'A000001',
'Template A02',
'registry.chiefsoft.com/pweb/pweb-01-merms-pweb0005:latest',
1);
INSERT INTO products_templates(product_id,name,provision_name,status)
VALUES(
'A000001',
'Template A03',
'registry.chiefsoft.com/pweb/pweb-01-merms-pweb0006:latest',
1);
INSERT INTO products_templates(product_id,name,provision_name,status)
VALUES(
'A000002',
'Practice B01',
'registry.chiefsoft.com/pweb/pweb-01-merms-pweb0007:latest',
1
);
INSERT INTO products_templates(product_id,name,provision_name,status)
VALUES(
'A000002',
'Practice B02',
'registry.chiefsoft.com/pweb/pweb-01-merms-pweb0008:latest',
1
);
INSERT INTO products_templates(product_id,name,provision_name,status)
VALUES(
'A000002',
'',
''
);
CREATE TABLE members_products (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
member_id INT REFERENCES members(id),
product_id VARCHAR(25) REFERENCES products(product_id),
internal_url VARCHAR(100) UNIQUE NOT NULL,
external_url VARCHAR(100),
dns_group VARCHAR(20),
status INT DEFAULT 0,
added timestamp without time zone DEFAULT now(),
updated timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY members_products
ADD CONSTRAINT members_products_id_key UNIQUE (id);
ALTER TABLE members_products
ADD CONSTRAINT members_products_unique_member_key
UNIQUE (member_id, product_id);
ALTER TABLE members_products ADD provision_port INT DEFAULT 0;
ALTER TABLE members_products ADD primary_server VARCHAR(100);
ALTER TABLE members_products ADD db_status INT DEFAULT 0;
ALTER TABLE members_products ADD provision_status INT DEFAULT 0;
ALTER TABLE members_products ADD p_file INT DEFAULT 0;
ALTER TABLE members_products ADD url_status INT DEFAULT 0;
ALTER TABLE members_products ADD product_template VARCHAR(100);
ALTER TABLE members_products ADD custom_template VARCHAR(100);
-- INSERT INTO merms_products (name,description,status,product_id, banner) VALUES ('Personal Website','Your personal professional web presence',1,'A000001', 'banner.jpg');
-- INSERT INTO merms_products (name,description,status,product_id, banner) VALUES ('Professional Website','Your healthcare practice online presence ',1,'A000002', 'banner.jpg');
-- INSERT INTO merms_products (name,description,status,product_id, banner) VALUES ('Personal Blog','Blog to share your health care view',1,'A000003', 'banner.jpg');
-- INSERT INTO merms_products (name,description,status,product_id, banner) VALUES ('Professional Blog','Booster your practice with engaging contents',1,'A000004', 'banner.jpg');
-- INSERT INTO merms_products (name,description,status,product_id, banner) VALUES ('Practice EMR','Get Open EMR for practice management',1,'A000005', 'banner.jpg');
INSERT INTO products (name,description,status,product_id, banner) VALUES ('Personal Website','Your personal professional web presence',1,'A000001', 'banner.jpg');
INSERT INTO products (name,description,status,product_id, banner) VALUES ('Professional Website','Your healthcare practice online presence ',1,'A000002', 'banner.jpg');
INSERT INTO products (name,description,status,product_id, banner) VALUES ('Personal Blog','Blog to share your health care view',1,'A000003', 'banner.jpg');
INSERT INTO products (name,description,status,product_id, banner) VALUES ('Professional Blog','Booster your practice with engaging contents',1,'A000004', 'banner.jpg');
INSERT INTO products (name,description,status,product_id, banner) VALUES ('Practice EMR','Get Open EMR for practice management',1,'A000005', 'banner.jpg');
INSERT INTO products (name,description,status,product_id, banner) VALUES ('Mers Practice','Get Open EMR for practice management',1,'A000006', 'banner.jpg');
UPDATE products SET start_url = 'm.ehr.mermsemr.com' WHERE product_id = 'A000006';
INSERT INTO products_details (product_id,details) VALUES ('A000006', '
OpenEMR is the most popular open source electronic health records and medical practice management solution. OpenEMR is a community of passionate volunteers and contributors dedicated to guarding OpenEMR status as a free, open source software solution for medical practices with a commitment to openness, kindness and cooperation.
Activate to deploy OpenEMR for your practice
URL: https://www.open-emr.org/
');
UPDATE products_details SET sale_text =
'
Start free for 1 month, and customize your product with additional features as you see fit. You''re in control-you can cancel anytime.
' WHERE product_id= 'products_details';
CREATE TABLE members_products_settings (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
member_id INT REFERENCES members(id),
subscription_uid VARCHAR(150),
product_id VARCHAR(25) REFERENCES products(product_id),
settings_key VARCHAR(100) NOT NULL,
setting_type VARCHAR(15) NOT NULL,
setting_value TEXT,
status INT DEFAULT 0,
added timestamp without time zone DEFAULT now(),
updated timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY members_products_settings
ADD CONSTRAINT members_products_settings_id_key UNIQUE (id);
ALTER TABLE members_products_settings
ADD CONSTRAINT members_products_settings_unique_member_key
UNIQUE (member_id, product_id, settings_key);
ALTER TABLE members_products_settings OWNER TO merms_panel;
-- member_id,subscription_uid,product_id,settings_key,setting_type,setting_value
CREATE TABLE provision_plans (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
provision_id INT REFERENCES members_products(id),
play_file VARCHAR(100)UNIQUE NOT NULL,
msg VARCHAR(100) ,
added timestamp without time zone DEFAULT now(),
updated timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY provision_plans
ADD CONSTRAINT provision_plans_id_key UNIQUE (id);
CREATE TABLE members_external_links (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
member_id INT REFERENCES members(id),
member_uid VARCHAR(100) NOT NULL,
facebook VARCHAR(125),
google VARCHAR(125),
linkedin VARCHAR(125),
other_web VARCHAR(125),
twitter VARCHAR(125),
added timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY members_external_links
ADD CONSTRAINT members_external_links_id_key UNIQUE (id);
CREATE TABLE provision_actions (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
member_id INT REFERENCES members(id),
product_uid VARCHAR(100) NOT NULL,
action VARCHAR(100) NOT NULL,
added timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY provision_actions
ADD CONSTRAINT provision_actions_id_key UNIQUE (id);
{"id": "3", "action": "Verifying your product..." , "date": "10-10-2010 11:00 AM"},
{"id": "2", "action": "URL assigned - Progress on the URL " , "date": "10-10-2010 11:30 AM"},
{"id": "1", "action": "Initiating product creation" , "date": "10-12-2010 11:30 AM"},
CREATE TABLE members_actions (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
member_id INT REFERENCES members(id),
member_uid VARCHAR(100) NOT NULL,
action_label VARCHAR(35) NOT NULL,
action_name VARCHAR(100) NOT NULL,
status_description VARCHAR(25) NOT NULL,
status INT DEFAULT 0,
added timestamp without time zone DEFAULT now(),
updated timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY members_actions
ADD CONSTRAINT members_actions_id_key UNIQUE (id);
CREATE TABLE subscription_options (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
display_name VARCHAR(25) UNIQUE NOT NULL,
option_name VARCHAR(100) UNIQUE NOT NULL,
monthly INT DEFAULT 0,
status INT DEFAULT 1,
added timestamp without time zone DEFAULT now(),
updated timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY subscription_options
ADD CONSTRAINT subscription_options_id_key UNIQUE (id);
ALTER TABLE subscription_options ADD stripe_product_id VARCHAR(100);
ALTER TABLE subscription_options ADD stripe_price_id VARCHAR(100);
ALTER TABLE subscription_options OWNER TO merms_panel;
INSERT INTO subscription_options(display_name,option_name,monthly)
VALUES ('Starter','STATRTER001',599);
INSERT INTO subscription_options(display_name,option_name,monthly)
VALUES ('Basic','BASIC001',1299);
INSERT INTO subscription_options(display_name,option_name,monthly)
VALUES ('Premium','PREMIUM001',2099);
CREATE TABLE subscription_options_items (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
option_name VARCHAR(100) REFERENCES subscription_options(option_name),
description VARCHAR(100) NOT NULL,
list_order INT DEFAULT 0,
status INT DEFAULT 1,
added timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY subscription_options_items
ADD CONSTRAINT subscription_options_items_id_key UNIQUE (id);
CREATE TABLE payments_session(
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
member_id INT REFERENCES members(id),
option_name VARCHAR(100) REFERENCES subscription_options(option_name),
processor VARCHAR(25) NOT NULL,
session_id VARCHAR(150) NOT NULL,
status INT DEFAULT 1,
added timestamp without time zone DEFAULT now(),
updated timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY payments_session
ADD CONSTRAINT payments_session_id_key UNIQUE (id);
ALTER TABLE payments_session OWNER TO merms_panel;
--
-- __tablename__ = 'payments_session'
--
-- id = db.Column(
-- db.Integer,
-- primary_key=True,
-- autoincrement=True,
-- )
-- uid = db.Column(db.String(150), nullable=True)
-- member_id = db.Column(db.Integer, nullable=False)
-- product_id = db.Column(db.String(25), nullable=False)
-- processor = db.Column(db.String(25), nullable=False)
-- session_id = db.Column(db.String(150), nullable=False)
-- status = db.Column(db.Integer, nullable=True, default=1)
-- added = db.Column(db.DateTime(timezone=True), server_default=func.now())
-- updated = db.Column(db.DateTime(timezone=True), server_default=func.now(), onupdate=func.now())
CREATE TABLE payments (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
member_id INT REFERENCES members(id),
option_name VARCHAR(100) REFERENCES subscription_options(option_name),
option_type VARCHAR(25),
payment_uid VARCHAR(100) UNIQUE NOT NULL,
amount INT DEFAULT 0,
status INT DEFAULT 1,
added timestamp without time zone DEFAULT now(),
sub_start timestamp without time zone,
next_billing timestamp without time zone,
sub_stop timestamp without time zone
);
ALTER TABLE ONLY payments
ADD CONSTRAINT payments_id_key UNIQUE (id);
ALTER TABLE payments OWNER TO merms_panel;
{'payment_uid': UUID('360b8829-45e0-4419-bcf0-18f4087f14b9'), 'member_id': 1, 'option_name': 'STATRTER001'}
ALTER TABLE subscription_options_items OWNER TO merms_panel;
INSERT INTO subscription_options_items (option_name,description,list_order)
VALUES('STATRTER001','Personal Web Presence',0);
INSERT INTO subscription_options_items (option_name,description,list_order)
VALUES('STATRTER001','Professional Online Presence',2);
INSERT INTO subscription_options_items (option_name,description,list_order)
VALUES('STATRTER001','Personal and Professional Forum',4);
INSERT INTO subscription_options_items (option_name,description,list_order)
VALUES('STATRTER001','Contacts Management',6);
INSERT INTO subscription_options_items (option_name,description,list_order)
VALUES('STATRTER001','Site Monitoring ',8);
INSERT INTO subscription_options_items (option_name,description,list_order)
VALUES('STATRTER001','',0);
INSERT INTO subscription_options_items (option_name,description,list_order)
VALUES('BASIC001','Everything in Starter Plus',0);
INSERT INTO subscription_options_items (option_name,description,list_order)
VALUES('BASIC001','5 Site Plugins',2);
INSERT INTO subscription_options_items (option_name,description,list_order)
VALUES('BASIC001','1 Automatic Content Posting per Week',4);
INSERT INTO subscription_options_items (option_name,description,list_order)
VALUES('BASIC001','Basic Site Traffic Engagement',6);
INSERT INTO subscription_options_items (option_name,description,list_order)
VALUES('BASIC001','Basic Site Intelligence',8);
INSERT INTO subscription_options_items (option_name,description,list_order)
VALUES('BASIC001','',0);
INSERT INTO subscription_options_items (option_name,description,list_order)
VALUES('BASIC001','',0);
INSERT INTO subscription_options_items (option_name,description,list_order)
VALUES('PREMIUM001','Everything in Starter & Basic Plus',0);
INSERT INTO subscription_options_items (option_name,description,list_order)
VALUES('PREMIUM001','',0);
INSERT INTO subscription_options_items (option_name,description,list_order)
VALUES('PREMIUM001','',0);
INSERT INTO subscription_options_items (option_name,description,list_order)
VALUES('PREMIUM001','',0);
DROP TABLE subscription_generative;
CREATE TABLE subscription_generative(
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
member_id INT REFERENCES members(id),
practice VARCHAR(100) NOT NULL,
specialization VARCHAR(100) NOT NULL,
product_id VARCHAR(25) NOT NULL,
subscription_uid VARCHAR(100) NOT NULL,
status INT DEFAULT 0,
added timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY subscription_generative
ADD CONSTRAINT subscription_generative_id_key UNIQUE (id);
ALTER TABLE subscription_generative OWNER TO merms_panel;
CREATE TABLE generative_results(
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
member_id INT REFERENCES members(id) NOT NULL,
product_id VARCHAR(25) NOT NULL,
var_name VARCHAR(100) NOT NULL,
subscription_uid VARCHAR(100) NOT NULL,
text_result TEXT,
status INT DEFAULT 0,
added timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY generative_results
ADD CONSTRAINT generative_results_id_key UNIQUE (id);
ALTER TABLE generative_results OWNER TO merms_panel;
CREATE TABLE office_users(
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
username VARCHAR(25) UNIQUE NOT NULL,
password VARCHAR(100) NOT NULL,
firstname VARCHAR(25) NOT NULL,
lastname VARCHAR(25) NOT NULL,
acc_level INT DEFAULT 10,
status INT DEFAULT 0,
added timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY office_users
ADD CONSTRAINT office_users_id_key UNIQUE (id);
ALTER TABLE office_users OWNER TO merms_panel;
INSERT INTO office_users (username, password, firstname, lastname, acc_level) VALUES ('mermsadmin','password','Merms','Admin',1000);
CREATE TABLE products_contacts(
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
username VARCHAR(25) UNIQUE NOT NULL,
product_id VARCHAR(25) NOT NULL,
subscription_uid VARCHAR(100) NOT NULL,
title VARCHAR(100) NOT NULL,
sender VARCHAR(120) NOT NULL,
message TEXT,
status INT DEFAULT 0,
added timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY products_contacts
ADD CONSTRAINT products_contacts_id_key UNIQUE (id);
ALTER TABLE products_contacts OWNER TO merms_panel;
CREATE TABLE custom_templates (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
custom_id VARCHAR(25) UNIQUE NOT NULL,
provision_name VARCHAR(250),
added timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY custom_templates
ADD CONSTRAINT custom_templates_id_key UNIQUE (id);
ALTER TABLE custom_templates OWNER TO merms_panel;
INSERT INTO custom_templates(custom_id,provision_name) VALUES('icare_template','registry.chiefsoft.com/custom/mermsicare-mermshostedicare-001:latest');
INSERT INTO custom_templates(custom_id,provision_name) VALUES('kevkem_template','registry.chiefsoft.com/custom/mermskevkem-mermshostedicare-001:latest');
INSERT INTO custom_templates(custom_id,provision_name) VALUES('sanya_pers_template','registry.chiefsoft.com/custom/mermssanyaameye-mermshosted-pers-sanyamaeye-001:latest');
icare_template
registry.chiefsoft.com/custom/mermsicare-mermshostedicare-001:latest
kevkem_template
registry.chiefsoft.com/custom/mermskevkem-mermshostedicare-001:latest
new_l = {
"uid": "425611f2-c692-4404-b93d-76ca7a5ce7" + str(x),
"title": "Contact Random Item on " + str(x),
"category": cat_list[random.randint(0, 3)],
"added": calDate,
"sender": "Firstname Lastname" + str(random.randint(1, 4)),
"message": dummy_message()
}
"options": {
"starter":{
"package_uid" : "cd2c0a4d-9ad4-472e-96f5-28d10c06916f",
"display_name" : "Starter",
"monthly" : 5.99,
"items" : ['Post Jobs','advanced instructors search','invite candidates','post events',
'Cancel anythime']
},
"basic": {
"package_uid": "ef2ffa1c-9272-42cd-9d33-0e614047b4f8",
"display_name": "Basic",
"monthly": 12.99,
"items": ['Post Jobs', 'advanced instructors search', 'invite candidates', 'post events',
'Cancel anythime']
},
"premium": {
"package_uid": "64bf48f6-1e7f-402e-8ff0-76f4ce0f2055",
"display_name": "Premium",
"monthly": 20.99,
"items": ['Post Jobs', 'advanced instructors search', 'invite candidates', 'post events',
'Cancel anythime']
},
const insertQuery = 'INSERT INTO ss_subs(members_id, members_uid, action_label,action_name,status_description,status ) VALUES($1, $2, $3, $4, $5, %6)'
var Querydata = {
"members_id": req.query.uid,
"members_uid": req.query.member_id,
"action_label": 'processing',
"action_name": 'processing',
"status_description": req.query.page
"status": 0
};
await db.query(insertQuery, Querydata, (err, res) => {
if (err) {
console.log(err.stack)
} else {
console.log(res.rows[0])
}
{
"email": "ameye@chiefsoft.com",
"firstname": "Olusesan",
"lastname": "Ameye",
"isChecked": true
}
CREATE TABLE ttt (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
username VARCHAR(35) NOT NULL
);
-- up
ALTER TABLE myoldtable ADD COLUMN newcolumn TEXT;
ALTER TABLE myoldtable ADD CONSTRAINT myoldtable_oldcolumn_newcolumn_key UNIQUE (oldcolumn, newcolumn);
---
ALTER TABLE myoldtable DROP CONSTRAINT myoldtable_oldcolumn_newcolumn_key;
ALTER TABLE myoldtable DROP COLUMN newcolumn;
-- down
merms_panel=# \d products
Table "public.products"
Column | Type | Collation | Nullable | Default
-------------+-----------------------------+-----------+----------+--------------------------------------
id | integer | | not null | nextval('products_id_seq'::regclass)
uid | uuid | | | uuid_generate_v4()
product_id | character varying(25) | | not null |
name | character varying(100) | | not null |
description | character varying(250) | | not null |
status | integer | | | 0
added | timestamp without time zone | | | now()
updated | timestamp without time zone | | | now()
banner | character varying(100) | | |
Indexes:
"products_id_key" UNIQUE CONSTRAINT, btree (id)
"products_name_key" UNIQUE CONSTRAINT, btree (name)
"products_product_id_key" UNIQUE CONSTRAINT, btree (product_id)
CREATE TABLE products_actions (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
product_id VARCHAR(25) UNIQUE NOT NULL,
name VARCHAR(100) UNIQUE NOT NULL,
description VARCHAR(250) NOT NULL,
status INT DEFAULT 0,
added timestamp without time zone DEFAULT now(),
updated timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY products_actions
ADD CONSTRAINT products_actions_id_key UNIQUE (id);
"name" => "Professional Website",
"description" => "Your healthcare practice online presence ",
"status" => 0,
"product" => 'A000002'
INSERT INTO members (username,email,password)
VALUES
('testaccount','works@chiefsoft.com',md5('merms.user.panel'));
INSERT INTO members (username,email,password)
VALUES
('sanyaameye','works@chiefsoft.com',md5('merms.user.panel'));
INSERT INTO members (username,email,password)
VALUES
('lekanaderibigbe','works@chiefsoft.com',md5('merms.user.panel'));
INSERT INTO members (username,email,password)
VALUES
('kevkemchiro','works@chiefsoft.com',md5('merms.user.panel'));
INSERT INTO members (username,email,password)
VALUES
('icarementalhealth','works@chiefsoft.com',md5('merms.user.panel'));
INSERT INTO members (username,email,password)
VALUES
('kintcare','works@chiefsoft.com',md5('merms.user.panel'));
su - postgres
createuser merms_panel
createdb merms_panel
psql template1 postgres
alter user merms_panel with encrypted password 'merms_panel';
grant all privileges on database merms_panel to merms_panel;
CREATE TABLE country (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
code VARCHAR(2) UNIQUE NOT NULL,
description VARCHAR(100) UNIQUE NOT NULL,
status INT DEFAULT 0,
signup INT DEFAULT 0,
added timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY country
ADD CONSTRAINT country_id_key UNIQUE (id);
ALTER TABLE country OWNER TO merms_panel;
INSERT INTO country(code,description) VALUES('AC','Acension Island');
INSERT INTO country(code,description) VALUES('AF','Afghanistan');
INSERT INTO country(code,description) VALUES('AL','Albania');
INSERT INTO country(code,description) VALUES('DZ','Algeria');
INSERT INTO country(code,description) VALUES('AS','American Samoa');
INSERT INTO country(code,description) VALUES('AD','Andorra');
INSERT INTO country(code,description) VALUES('AO','Angola');
INSERT INTO country(code,description) VALUES('AI','Anguilla');
INSERT INTO country(code,description) VALUES('AG','Antigua');
INSERT INTO country(code,description) VALUES('AR','Argentina');
INSERT INTO country(code,description) VALUES('AM','Armenia');
INSERT INTO country(code,description) VALUES('AW','Aruba');
INSERT INTO country(code,description) VALUES('AT','Austria');
INSERT INTO country(code,description) VALUES('AZ','Azerbaijan');
INSERT INTO country(code,description) VALUES('BS','Bahamas');
INSERT INTO country(code,description) VALUES('BH','Bahrain');
INSERT INTO country(code,description) VALUES('BD','Bangladesh');
INSERT INTO country(code,description) VALUES('BB','Barbados');
INSERT INTO country(code,description) VALUES('BY','Belarus');
INSERT INTO country(code,description) VALUES('BE','Belgium');
INSERT INTO country(code,description) VALUES('BZ','Belize');
INSERT INTO country(code,description) VALUES('BJ','Benin');
INSERT INTO country(code,description) VALUES('BM','Bermuda');
INSERT INTO country(code,description) VALUES('BT','Bhutan');
INSERT INTO country(code,description) VALUES('BO','Bolivia');
INSERT INTO country(code,description) VALUES('BA','Bosnia Herzegovina');
INSERT INTO country(code,description) VALUES('BW','Botswana');
INSERT INTO country(code,description) VALUES('BR','Brazil');
INSERT INTO country(code,description) VALUES('BN','Brunei');
INSERT INTO country(code,description) VALUES('BG','Bulgaria');
INSERT INTO country(code,description) VALUES('BF','Burkina Faso');
INSERT INTO country(code,description) VALUES('BI','Burundi');
INSERT INTO country(code,description) VALUES('KH','Cambodia');
INSERT INTO country(code,description) VALUES('CM','Cameroon');
INSERT INTO country(code,description) VALUES('CV','Cape Verde');
INSERT INTO country(code,description) VALUES('KY','Cayman Islands');
INSERT INTO country(code,description) VALUES('CF','Central African Republic');
INSERT INTO country(code,description) VALUES('TD','Chad');
INSERT INTO country(code,description) VALUES('CL','Chile');
INSERT INTO country(code,description) VALUES('CN','China');
INSERT INTO country(code,description) VALUES('CO','Colombia');
INSERT INTO country(code,description) VALUES('KM','Comoros Islands');
INSERT INTO country(code,description) VALUES('CD','Congo Democratic Republic');
INSERT INTO country(code,description) VALUES('CG','Congo Republic');
INSERT INTO country(code,description) VALUES('CK','Cook Islands');
INSERT INTO country(code,description) VALUES('CR','Costa Rica');
INSERT INTO country(code,description) VALUES('HR','Croatia');
INSERT INTO country(code,description) VALUES('CU','Cuba');
INSERT INTO country(code,description) VALUES('CY','Cyprus');
INSERT INTO country(code,description) VALUES('CZ','Czech Republic');
INSERT INTO country(code,description) VALUES('DK','Denmark');
INSERT INTO country(code,description) VALUES('DG','Diego Garcia');
INSERT INTO country(code,description) VALUES('DJ','Djibouti');
INSERT INTO country(code,description) VALUES('DM','Dominica');
INSERT INTO country(code,description) VALUES('DO','Dominican Republic');
INSERT INTO country(code,description) VALUES('EC','Ecuador');
INSERT INTO country(code,description) VALUES('EG','Egypt');
INSERT INTO country(code,description) VALUES('SV','El Salvador');
INSERT INTO country(code,description) VALUES('GQ','Equatorial Guinea');
INSERT INTO country(code,description) VALUES('ER','Eritrea');
INSERT INTO country(code,description) VALUES('EE','Estonia');
INSERT INTO country(code,description) VALUES('ET','Ethiopia');
INSERT INTO country(code,description) VALUES('FO','Faeroe Islands');
INSERT INTO country(code,description) VALUES('FK','Falkland Islands (Malvinas)');
INSERT INTO country(code,description) VALUES('FJ','Fiji Islands');
INSERT INTO country(code,description) VALUES('FI','Finland');
INSERT INTO country(code,description) VALUES('FR','France');
INSERT INTO country(code,description) VALUES('TF','French Antilles (Martinique)');
INSERT INTO country(code,description) VALUES('GF','French Guiana');
INSERT INTO country(code,description) VALUES('PF','French Polynesia');
INSERT INTO country(code,description) VALUES('GA','Gabon');
INSERT INTO country(code,description) VALUES('GM','Gambia');
INSERT INTO country(code,description) VALUES('GE','Georgia');
INSERT INTO country(code,description) VALUES('DE','Germany');
INSERT INTO country(code,description) VALUES('GI','Gibraltar');
INSERT INTO country(code,description) VALUES('GR','Greece');
INSERT INTO country(code,description) VALUES('GL','Greenland');
INSERT INTO country(code,description) VALUES('GD','Grenada');
INSERT INTO country(code,description) VALUES('GP','Guadeloupe');
INSERT INTO country(code,description) VALUES('GU','Guam');
INSERT INTO country(code,description) VALUES('GT','Guatemala');
INSERT INTO country(code,description) VALUES('GN','Guinea');
INSERT INTO country(code,description) VALUES('GH','Ghana');
INSERT INTO country(code,description) VALUES('GW','Guinea Bissau');
INSERT INTO country(code,description) VALUES('GY','Guyana');
INSERT INTO country(code,description) VALUES('HT','Haiti');
INSERT INTO country(code,description) VALUES('HN','Honduras');
INSERT INTO country(code,description) VALUES('HK','Hong Kong');
INSERT INTO country(code,description) VALUES('HU','Hungary');
INSERT INTO country(code,description) VALUES('IS','Iceland');
INSERT INTO country(code,description) VALUES('IN','India');
INSERT INTO country(code,description) VALUES('ID','Indonesia');
INSERT INTO country(code,description) VALUES('IR','Iran');
INSERT INTO country(code,description) VALUES('IQ','Iraq');
INSERT INTO country(code,description) VALUES('IE','Ireland');
INSERT INTO country(code,description) VALUES('IL','Israel');
INSERT INTO country(code,description) VALUES('IT','Italy');
INSERT INTO country(code,description) VALUES('CI','Ivory Coast');
INSERT INTO country(code,description) VALUES('JP','Japan');
INSERT INTO country(code,description) VALUES('JO','Jordan');
INSERT INTO country(code,description) VALUES('KZ','Kazakhstan');
INSERT INTO country(code,description) VALUES('KE','Kenya');
INSERT INTO country(code,description) VALUES('KI','Kiribati');
INSERT INTO country(code,description) VALUES('KW','Kuwait');
INSERT INTO country(code,description) VALUES('KG','Kyrgyzstan');
INSERT INTO country(code,description) VALUES('LA','Laos');
INSERT INTO country(code,description) VALUES('LV','Latvia');
INSERT INTO country(code,description) VALUES('LB','Lebanon');
INSERT INTO country(code,description) VALUES('LS','Lesotho');
INSERT INTO country(code,description) VALUES('LR','Liberia');
INSERT INTO country(code,description) VALUES('LY','Libya');
INSERT INTO country(code,description) VALUES('LI','Liechtenstein');
INSERT INTO country(code,description) VALUES('LT','Lithuania');
INSERT INTO country(code,description) VALUES('LU','Luxembourg');
INSERT INTO country(code,description) VALUES('MO','Macau');
INSERT INTO country(code,description) VALUES('MK','Macedonia');
INSERT INTO country(code,description) VALUES('MG','Madagascar');
INSERT INTO country(code,description) VALUES('MW','Malawi');
INSERT INTO country(code,description) VALUES('MY','Malaysia');
INSERT INTO country(code,description) VALUES('MV','Maldives');
INSERT INTO country(code,description) VALUES('ML','Mali');
INSERT INTO country(code,description) VALUES('MT','Malta');
INSERT INTO country(code,description) VALUES('MH','Marshall Islands');
INSERT INTO country(code,description) VALUES('MR','Mauritania');
INSERT INTO country(code,description) VALUES('MU','Mauritius');
INSERT INTO country(code,description) VALUES('MX','Mexico');
INSERT INTO country(code,description) VALUES('MD','Moldova');
INSERT INTO country(code,description) VALUES('MC','Monaco');
INSERT INTO country(code,description) VALUES('MN','Mongolia');
INSERT INTO country(code,description) VALUES('MS','Montserrat');
INSERT INTO country(code,description) VALUES('MA','Morocco');
INSERT INTO country(code,description) VALUES('MZ','Mozambique');
INSERT INTO country(code,description) VALUES('MM','Myanmar');
INSERT INTO country(code,description) VALUES('NA','Namibia');
INSERT INTO country(code,description) VALUES('NR','Nauru');
INSERT INTO country(code,description) VALUES('NP','Nepal');
INSERT INTO country(code,description) VALUES('NL','Netherlands');
INSERT INTO country(code,description) VALUES('AN','Netherlands Antilles');
INSERT INTO country(code,description) VALUES('NC','New Caledonia');
INSERT INTO country(code,description) VALUES('NI','Nicaragua');
INSERT INTO country(code,description) VALUES('NE','Niger');
INSERT INTO country(code,description) VALUES('NN','Niue');
INSERT INTO country(code,description) VALUES('KP','North Korea');
INSERT INTO country(code,description) VALUES('NO','Norway');
INSERT INTO country(code,description) VALUES('OM','Oman');
INSERT INTO country(code,description) VALUES('PK','Pakistan');
INSERT INTO country(code,description) VALUES('PW','Palau');
INSERT INTO country(code,description) VALUES('PL','Palestine');
INSERT INTO country(code,description) VALUES('PA','Panama');
INSERT INTO country(code,description) VALUES('PG','Papua New Guinea');
INSERT INTO country(code,description) VALUES('PY','Paraguay');
INSERT INTO country(code,description) VALUES('PE','Peru');
INSERT INTO country(code,description) VALUES('PH','Philippines');
INSERT INTO country(code,description) VALUES('PT','Portugal');
INSERT INTO country(code,description) VALUES('PR','Puerto Rico');
INSERT INTO country(code,description) VALUES('QA','Qatar');
INSERT INTO country(code,description) VALUES('RE','Reunion Island');
INSERT INTO country(code,description) VALUES('RO','Romania');
INSERT INTO country(code,description) VALUES('RU','Russia');
INSERT INTO country(code,description) VALUES('RW','Rwanda');
INSERT INTO country(code,description) VALUES('SH','Saint Helena');
INSERT INTO country(code,description) VALUES('KN','Saint Kitts and Nevis');
INSERT INTO country(code,description) VALUES('LC','Saint Lucia');
INSERT INTO country(code,description) VALUES('SP','Saint Pierre and Miquelon');
INSERT INTO country(code,description) VALUES('VC','Saint Vincent and The Grenadines');
INSERT INTO country(code,description) VALUES('SM','San Marino');
INSERT INTO country(code,description) VALUES('JM','Jamaica');
INSERT INTO country(code,description) VALUES('ST','Sao Tome and Principe');
INSERT INTO country(code,description) VALUES('SA','Saudi Arabia');
INSERT INTO country(code,description) VALUES('SN','Senegal');
INSERT INTO country(code,description) VALUES('CS','Serbia and Montenegro');
INSERT INTO country(code,description) VALUES('SC','Seychelles');
INSERT INTO country(code,description) VALUES('SL','Sierra Leone');
INSERT INTO country(code,description) VALUES('SK','Slovakia');
INSERT INTO country(code,description) VALUES('SI','Slovenia');
INSERT INTO country(code,description) VALUES('SB','Solomon Islands');
INSERT INTO country(code,description) VALUES('SO','Somalia');
INSERT INTO country(code,description) VALUES('KR','South Korea');
INSERT INTO country(code,description) VALUES('ES','Spain');
INSERT INTO country(code,description) VALUES('LK','Sri Lanka');
INSERT INTO country(code,description) VALUES('SD','Sudan');
INSERT INTO country(code,description) VALUES('SR','Suriname');
INSERT INTO country(code,description) VALUES('SZ','Swaziland');
INSERT INTO country(code,description) VALUES('SE','Sweden');
INSERT INTO country(code,description) VALUES('CH','Switzerland');
INSERT INTO country(code,description) VALUES('SY','Syria');
INSERT INTO country(code,description) VALUES('TW','Taiwan');
INSERT INTO country(code,description) VALUES('TJ','Tajikistan');
INSERT INTO country(code,description) VALUES('TZ','Tanzania');
INSERT INTO country(code,description) VALUES('TH','Thailand');
INSERT INTO country(code,description) VALUES('TG','Togo');
INSERT INTO country(code,description) VALUES('TO','Tonga');
INSERT INTO country(code,description) VALUES('TT','Trinidad and Tobago');
INSERT INTO country(code,description) VALUES('TN','Tunisia');
INSERT INTO country(code,description) VALUES('TR','Turkey');
INSERT INTO country(code,description) VALUES('TM','Turkmenistan');
INSERT INTO country(code,description) VALUES('TC','Turks and Caicos');
INSERT INTO country(code,description) VALUES('TV','Tuvalu');
INSERT INTO country(code,description) VALUES('UG','Uganda');
INSERT INTO country(code,description) VALUES('UA','Ukraine');
INSERT INTO country(code,description) VALUES('AE','United Arab Emirates');
INSERT INTO country(code,description) VALUES('UY','Uruguay');
INSERT INTO country(code,description) VALUES('UZ','Uzbekistan');
INSERT INTO country(code,description) VALUES('VU','Vanuatu');
INSERT INTO country(code,description) VALUES('VE','Venezuela');
INSERT INTO country(code,description) VALUES('VN','Vietnam');
INSERT INTO country(code,description) VALUES('BV','Virgin Islands (British)');
INSERT INTO country(code,description) VALUES('VI','Virgin Islands (U.S.)');
INSERT INTO country(code,description) VALUES('00','Virtual');
INSERT INTO country(code,description) VALUES('WF','Wallis and Futuna');
INSERT INTO country(code,description) VALUES('EH','Western Samoa');
INSERT INTO country(code,description) VALUES('YE','Yemen');
INSERT INTO country(code,description) VALUES('ZR','Zaire');
INSERT INTO country(code,description) VALUES('ZM','Zambia');
INSERT INTO country(code,description) VALUES('ZW','Zimbabwe');
INSERT INTO country(code,description) VALUES('US','United States');
INSERT INTO country(code,description) VALUES('NG','Nigeria');
INSERT INTO country(code,description) VALUES('AU','Australia');
INSERT INTO country(code,description) VALUES('CA','Canada');
INSERT INTO country(code,description) VALUES('NZ','New Zealand');
INSERT INTO country(code,description) VALUES('SG','Singapore');
INSERT INTO country(code,description) VALUES('ZA','South Africa');
INSERT INTO country(code,description) VALUES('GB','United Kingdom');
UPDATE country SET signup=1, status = 1 WHERE code IN ('US','CA','GB', 'NG', 'NL', 'NZ', 'ZA');