Skip to content

Commit

Permalink
Updated the name of the pwnedhub-config database to pwnedhub-admin.
Browse files Browse the repository at this point in the history
Updated the title of all PwnedAdmin applications.
  • Loading branch information
lanmaster53 committed May 10, 2024
1 parent 1bf719a commit 2c3c0a2
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 24 deletions.
4 changes: 2 additions & 2 deletions database/cs/01-init.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-- Setup databases and users
CREATE DATABASE IF NOT EXISTS `pwnedhub`;
CREATE DATABASE IF NOT EXISTS `pwnedhub-test`;
CREATE DATABASE IF NOT EXISTS `pwnedhub-config`;
CREATE DATABASE IF NOT EXISTS `pwnedhub-admin`;
CREATE USER 'pwnedhub'@'%' IDENTIFIED BY 'dbconnectpass';
GRANT ALL PRIVILEGES ON `pwnedhub` . * TO 'pwnedhub'@'%';
GRANT ALL PRIVILEGES ON `pwnedhub-test` . * TO 'pwnedhub'@'%';
GRANT ALL PRIVILEGES ON `pwnedhub-config` . * TO 'pwnedhub'@'%';
GRANT ALL PRIVILEGES ON `pwnedhub-admin` . * TO 'pwnedhub'@'%';
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-- Attach to database
USE `pwnedhub-config`;
USE `pwnedhub-admin`;

-- MySQL dump 10.13 Distrib 8.0.33, for Linux (x86_64)
--
-- Host: localhost Database: pwnedhub-config
-- Host: localhost Database: pwnedhub-admin
-- ------------------------------------------------------
-- Server version 8.0.33

Expand Down
4 changes: 2 additions & 2 deletions database/ctf/01-init.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-- Setup databases and users
CREATE DATABASE IF NOT EXISTS `pwnedhub`;
CREATE DATABASE IF NOT EXISTS `pwnedhub-test`;
CREATE DATABASE IF NOT EXISTS `pwnedhub-config`;
CREATE DATABASE IF NOT EXISTS `pwnedhub-admin`;
CREATE USER 'pwnedhub'@'%' IDENTIFIED BY 'dbconnectpass';
GRANT ALL PRIVILEGES ON `pwnedhub` . * TO 'pwnedhub'@'%';
GRANT ALL PRIVILEGES ON `pwnedhub-test` . * TO 'pwnedhub'@'%';
GRANT ALL PRIVILEGES ON `pwnedhub-config` . * TO 'pwnedhub'@'%';
GRANT ALL PRIVILEGES ON `pwnedhub-admin` . * TO 'pwnedhub'@'%';
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-- Attach to database
USE `pwnedhub-config`;
USE `pwnedhub-admin`;

-- MySQL dump 10.13 Distrib 8.0.33, for Linux (x86_64)
--
-- Host: localhost Database: pwnedhub-config
-- Host: localhost Database: pwnedhub-admin
-- ------------------------------------------------------
-- Server version 8.0.33

Expand Down
4 changes: 2 additions & 2 deletions database/init/01-init.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-- Setup databases and users
CREATE DATABASE IF NOT EXISTS `pwnedhub`;
CREATE DATABASE IF NOT EXISTS `pwnedhub-test`;
CREATE DATABASE IF NOT EXISTS `pwnedhub-config`;
CREATE DATABASE IF NOT EXISTS `pwnedhub-admin`;
CREATE USER 'pwnedhub'@'%' IDENTIFIED BY 'dbconnectpass';
GRANT ALL PRIVILEGES ON `pwnedhub` . * TO 'pwnedhub'@'%';
GRANT ALL PRIVILEGES ON `pwnedhub-test` . * TO 'pwnedhub'@'%';
GRANT ALL PRIVILEGES ON `pwnedhub-config` . * TO 'pwnedhub'@'%';
GRANT ALL PRIVILEGES ON `pwnedhub-admin` . * TO 'pwnedhub'@'%';
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-- Attach to database
USE `pwnedhub-config`;
USE `pwnedhub-admin`;

-- MySQL dump 10.13 Distrib 8.0.33, for Linux (x86_64)
--
-- Host: localhost Database: pwnedhub-config
-- Host: localhost Database: pwnedhub-admin
-- ------------------------------------------------------
-- Server version 8.0.33

Expand Down
2 changes: 1 addition & 1 deletion pwnedadmin/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class BaseConfig(object):

# database
DATABASE_HOST = os.environ.get('DATABASE_HOST', 'localhost')
SQLALCHEMY_DATABASE_URI = f"mysql://pwnedhub:dbconnectpass@{DATABASE_HOST}/pwnedhub-config"
SQLALCHEMY_DATABASE_URI = f"mysql://pwnedhub:dbconnectpass@{DATABASE_HOST}/pwnedhub-admin"
SQLALCHEMY_TRACK_MODIFICATIONS = False


Expand Down
2 changes: 1 addition & 1 deletion pwnedadmin/templates/config.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Config</title>
<title>PwnedAdmin | Config</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>html{visibility:hidden;opacity:0;}</style><!-- FOUC fix 1/2 -->
<link rel="stylesheet" type="text/css" href="{{ url_for('common.static', filename='css/fontawesome.css') }}">
Expand Down
2 changes: 1 addition & 1 deletion pwnedadmin/templates/emails.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Inbox</title>
<title>PwnedAdmin | Inbox</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>html{visibility:hidden;opacity:0;}</style><!-- FOUC fix 1/2 -->
<link rel="stylesheet" type="text/css" href="{{ url_for('common.static', filename='css/fontawesome.css') }}">
Expand Down
2 changes: 1 addition & 1 deletion pwnedapi/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class BaseConfig(object):
DATABASE_HOST = os.environ.get('DATABASE_HOST', 'localhost')
SQLALCHEMY_DATABASE_URI = f"mysql://pwnedhub:dbconnectpass@{DATABASE_HOST}/pwnedhub-test"
SQLALCHEMY_BINDS = {
'config': f"mysql://pwnedhub:dbconnectpass@{DATABASE_HOST}/pwnedhub-config"
'admin': f"mysql://pwnedhub:dbconnectpass@{DATABASE_HOST}/pwnedhub-admin"
}
SQLALCHEMY_TRACK_MODIFICATIONS = False

Expand Down
4 changes: 2 additions & 2 deletions pwnedapi/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class Config(db.Model):
__tablename__ = 'configs'
__bind_key__ = 'config'
__bind_key__ = 'admin'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(255), nullable=False)
value = db.Column(db.Boolean, nullable=False)
Expand All @@ -30,7 +30,7 @@ def __repr__(self):

class Email(db.Model):
__tablename__ = 'emails'
__bind_key__ = 'config'
__bind_key__ = 'admin'
id = db.Column(db.Integer, primary_key=True)
created = db.Column(db.DateTime, nullable=False, default=get_current_utc_time)
sender = db.Column(db.String(255), nullable=False)
Expand Down
2 changes: 1 addition & 1 deletion pwnedhub/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class BaseConfig(object):
DATABASE_HOST = os.environ.get('DATABASE_HOST', 'localhost')
SQLALCHEMY_DATABASE_URI = f"mysql://pwnedhub:dbconnectpass@{DATABASE_HOST}/pwnedhub"
SQLALCHEMY_BINDS = {
'config': f"mysql://pwnedhub:dbconnectpass@{DATABASE_HOST}/pwnedhub-config"
'admin': f"mysql://pwnedhub:dbconnectpass@{DATABASE_HOST}/pwnedhub-admin"
}
SQLALCHEMY_TRACK_MODIFICATIONS = False

Expand Down
4 changes: 2 additions & 2 deletions pwnedhub/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class Config(db.Model):
__tablename__ = 'configs'
__bind_key__ = 'config'
__bind_key__ = 'admin'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(255), nullable=False)
value = db.Column(db.Boolean, nullable=False)
Expand All @@ -26,7 +26,7 @@ def __repr__(self):

class Email(db.Model):
__tablename__ = 'emails'
__bind_key__ = 'config'
__bind_key__ = 'admin'
id = db.Column(db.Integer, primary_key=True)
created = db.Column(db.DateTime, nullable=False, default=get_current_utc_time)
sender = db.Column(db.String(255), nullable=False)
Expand Down
3 changes: 0 additions & 3 deletions pwnedsso/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ class BaseConfig(object):
# database
DATABASE_HOST = os.environ.get('DATABASE_HOST', 'localhost')
SQLALCHEMY_DATABASE_URI = f"mysql://pwnedhub:dbconnectpass@{DATABASE_HOST}/pwnedhub"
SQLALCHEMY_BINDS = {
'config': f"mysql://pwnedhub:dbconnectpass@{DATABASE_HOST}/pwnedhub-config"
}
SQLALCHEMY_TRACK_MODIFICATIONS = False


Expand Down

0 comments on commit 2c3c0a2

Please sign in to comment.