diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..6b18fb6 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,18 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ +/copilot.data.migration.ask2agent.xml +/data_source_mapping.xml +/dataSources.xml +/modules.xml +/php.xml +/sqldialects.xml +/vcs.xml +/WebEngineOpenMu.iml diff --git a/README-OPENMU-POSTGRES.md b/README-OPENMU-POSTGRES.md index 0f26707..e37c1e5 100644 --- a/README-OPENMU-POSTGRES.md +++ b/README-OPENMU-POSTGRES.md @@ -19,6 +19,18 @@ Admins running OpenMU (modern) who want WebEngine CMS to use OpenMU’s PostgreS Tip: If you previously used the built‑in PHP server or helper scripts, they are no longer needed. Use XAMPP Apache as above. +## For Linux Systems +1) Enable the Apache mod_rewrite module (sudo a2enmod rewrite) +2) Configure Apache to allow .htaccess overrides (/etc/apache2/apache2.conf) + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted + <\/Directory> +3) sudo service apache2 restart + + + ## Fresh Installation (Recommended) 1. Requirements: ensure pdo_pgsql passes. 2. Database Connection (PostgreSQL defaults) diff --git a/includes/config/webengine.json b/includes/config/webengine.json index b657e02..4f20e1d 100644 --- a/includes/config/webengine.json +++ b/includes/config/webengine.json @@ -12,11 +12,11 @@ "website_meta_keywords": "OpenMU, MU Online, Season 6, Episode 3, private server, .NET, PostgreSQL, cross-platform, Docker, modern", "website_forum_link": "https://webenginecms.org/", "SQL_DB_HOST": "localhost", - "SQL_DB_NAME": "openmu-db-name", + "SQL_DB_NAME": "openmu", "SQL_DB_2_NAME": "", "SQL_DB_USER": "postgres", - "SQL_DB_PASS": "postgres-password", - "SQL_DB_PORT": "5432", + "SQL_DB_PASS": "admin", + "SQL_DB_PORT": "5433", "SQL_USE_2_DB": false, "SQL_PDO_DRIVER": "3", "SQL_PASSWORD_ENCRYPTION": "bcrypt", @@ -34,7 +34,7 @@ "username_max_len": 10, "password_min_len": 4, "password_max_len": 20, - "webengine_cms_installed": true, + "webengine_cms_installed": false, "cron_api": true, "cron_api_key": "123456", "social_link_facebook": "https://facebook.com/", diff --git a/install/sql/openmu/webengine_tables.sql b/install/sql/openmu/webengine_tables.sql index 75b071c..35afc34 100644 --- a/install/sql/openmu/webengine_tables.sql +++ b/install/sql/openmu/webengine_tables.sql @@ -42,7 +42,7 @@ CREATE TABLE IF NOT EXISTS data.webengine_vote_sites ( -- WebEngine Vote Logs CREATE TABLE IF NOT EXISTS data.webengine_vote_logs ( id SERIAL PRIMARY KEY, - account_id UUID REFERENCES data."Account"(id), + account_id UUID REFERENCES data."Account"("Id"), vote_site_id INTEGER REFERENCES data.webengine_vote_sites(id), ip_address INET, voted_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP, @@ -52,8 +52,8 @@ CREATE TABLE IF NOT EXISTS data.webengine_vote_logs ( -- WebEngine Credits Logs CREATE TABLE IF NOT EXISTS data.webengine_credits_logs ( id SERIAL PRIMARY KEY, - account_id UUID REFERENCES data."Account"(id), - character_id UUID REFERENCES data."Character"(id), + account_id UUID REFERENCES data."Account"("Id"), + character_id UUID REFERENCES data."Character"("Id"), amount INTEGER NOT NULL, transaction_type VARCHAR(50) NOT NULL, -- 'earned', 'spent', 'admin_add', 'admin_remove' description TEXT, @@ -63,8 +63,8 @@ CREATE TABLE IF NOT EXISTS data.webengine_credits_logs ( -- WebEngine Bans CREATE TABLE IF NOT EXISTS data.webengine_bans ( id SERIAL PRIMARY KEY, - account_id UUID REFERENCES data."Account"(id), - character_id UUID REFERENCES data."Character"(id), + account_id UUID REFERENCES data."Account"("Id"), + character_id UUID REFERENCES data."Character"("Id"), banned_by VARCHAR(50) NOT NULL, ban_reason TEXT NOT NULL, ban_type VARCHAR(20) NOT NULL, -- 'account', 'character', 'ip' @@ -86,8 +86,8 @@ CREATE TABLE IF NOT EXISTS data.webengine_blocked_ips ( -- WebEngine PayPal Transactions CREATE TABLE IF NOT EXISTS data.webengine_paypal_transactions ( id SERIAL PRIMARY KEY, - account_id UUID REFERENCES data."Account"(id), - character_id UUID REFERENCES data."Character"(id), + account_id UUID REFERENCES data."Account"("Id"), + character_id UUID REFERENCES data."Character"("Id"), transaction_id VARCHAR(100) NOT NULL UNIQUE, amount DECIMAL(10,2) NOT NULL, currency VARCHAR(3) DEFAULT 'USD', @@ -100,7 +100,7 @@ CREATE TABLE IF NOT EXISTS data.webengine_paypal_transactions ( -- WebEngine Password Change Requests CREATE TABLE IF NOT EXISTS data.webengine_password_requests ( id SERIAL PRIMARY KEY, - account_id UUID REFERENCES data."Account"(id), + account_id UUID REFERENCES data."Account"("Id"), verification_key VARCHAR(100) NOT NULL UNIQUE, email VARCHAR(255) NOT NULL, requested_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP, @@ -111,7 +111,7 @@ CREATE TABLE IF NOT EXISTS data.webengine_password_requests ( -- WebEngine Email Verification CREATE TABLE IF NOT EXISTS data.webengine_email_verification ( id SERIAL PRIMARY KEY, - account_id UUID REFERENCES data."Account"(id), + account_id UUID REFERENCES data."Account"("Id"), verification_key VARCHAR(100) NOT NULL UNIQUE, email VARCHAR(255) NOT NULL, created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP, @@ -122,7 +122,7 @@ CREATE TABLE IF NOT EXISTS data.webengine_email_verification ( -- WebEngine Account Country (for statistics) CREATE TABLE IF NOT EXISTS data.webengine_account_country ( id SERIAL PRIMARY KEY, - account_id UUID REFERENCES data."Account"(id), + account_id UUID REFERENCES data."Account"("Id"), country_code VARCHAR(2) NOT NULL, country_name VARCHAR(100) NOT NULL, detected_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP