added default sql install + ordered sql folder(a bit)
This commit is contained in:
parent
21b009609b
commit
a483fdbacb
40
sql/DATA_DEFAULT.php
Normal file
40
sql/DATA_DEFAULT.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* System - PHP Framework
|
||||
*
|
||||
* PHP Version 5.6
|
||||
*
|
||||
* @copyright 2016 Ulf Gebhardt (http://www.webcraft-media.de)
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link https://github.com/webcraftmedia/system
|
||||
* @package SYSTEM\SQL
|
||||
*/
|
||||
namespace SYSTEM\SQL;
|
||||
|
||||
/**
|
||||
* DATA_SYSTEM_TEXT Class provided by System to install the Page Defaults e.g meta tags to the Database(includes Tags)
|
||||
*/
|
||||
class DATA_DEFAULT extends \SYSTEM\DB\QI {
|
||||
/**
|
||||
* Get Classname of the QQ
|
||||
*
|
||||
* @return string Returns classname
|
||||
*/
|
||||
public static function get_class(){return \get_class();}
|
||||
|
||||
/**
|
||||
* Get paths of PostgreSQL compatible sql files
|
||||
*
|
||||
* @return array Returns paths of PostgreSQL compatible sql files
|
||||
*/
|
||||
public static function files_pgsql(){
|
||||
return array( (new \SYSTEM\PSQL('/pgsql/data/default.sql'))->SERVERPATH());}
|
||||
|
||||
/**
|
||||
* Get paths of MYSQL compatible sql files
|
||||
*
|
||||
* @return array Returns paths of MYSQL compatible sql files
|
||||
*/
|
||||
public static function files_mysql(){
|
||||
return array( (new \SYSTEM\PSQL('/qt/mysql/data/default.sql'))->SERVERPATH());}
|
||||
}
|
||||
@ -28,9 +28,9 @@ class DATA_SYSTEM_API extends \SYSTEM\DB\QI {
|
||||
* @return array Returns paths of PostgreSQL compatible sql files
|
||||
*/
|
||||
public static function files_pgsql(){
|
||||
return array( (new \SYSTEM\PSQL('/qt/pgsql/data/system_api.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/pgsql/data/system_api_default.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/pgsql/data/system_sai_api.sql'))->SERVERPATH());
|
||||
return array( (new \SYSTEM\PSQL('/pgsql/data/system_api.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/pgsql/data/system_api_default.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/pgsql/data/system_sai_api.sql'))->SERVERPATH());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -39,8 +39,8 @@ class DATA_SYSTEM_API extends \SYSTEM\DB\QI {
|
||||
* @return array Returns paths of MYSQL compatible sql files
|
||||
*/
|
||||
public static function files_mysql(){
|
||||
return array( (new \SYSTEM\PSQL('/qt/mysql/data/system_api.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/mysql/data/system_api_default.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/mysql/data/system_sai_api.sql'))->SERVERPATH());
|
||||
return array( (new \SYSTEM\PSQL('/mysql/data/system_api.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/mysql/data/system_api_default.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/mysql/data/system_sai_api.sql'))->SERVERPATH());
|
||||
}
|
||||
}
|
||||
@ -28,7 +28,7 @@ class DATA_SYSTEM_CRON extends \SYSTEM\DB\QI {
|
||||
* @return array Returns paths of PostgreSQL compatible sql files
|
||||
*/
|
||||
public static function files_pgsql(){
|
||||
return array( (new \SYSTEM\PSQL('/qt/pgsql/data/system_cron.sql'))->SERVERPATH());}
|
||||
return array( (new \SYSTEM\PSQL('/pgsql/data/system_cron.sql'))->SERVERPATH());}
|
||||
|
||||
/**
|
||||
* Get paths of MYSQL compatible sql files
|
||||
@ -36,5 +36,5 @@ class DATA_SYSTEM_CRON extends \SYSTEM\DB\QI {
|
||||
* @return array Returns paths of MYSQL compatible sql files
|
||||
*/
|
||||
public static function files_mysql(){
|
||||
return array( (new \SYSTEM\PSQL('/qt/mysql/data/system_cron.sql'))->SERVERPATH());}
|
||||
return array( (new \SYSTEM\PSQL('/mysql/data/system_cron.sql'))->SERVERPATH());}
|
||||
}
|
||||
@ -28,7 +28,7 @@ class DATA_SYSTEM_PAGE extends \SYSTEM\DB\QI {
|
||||
* @return array Returns paths of PostgreSQL compatible sql files
|
||||
*/
|
||||
public static function files_pgsql(){
|
||||
return array( (new \SYSTEM\PSQL('/qt/pgsql/data/system_page.sql'))->SERVERPATH());}
|
||||
return array( (new \SYSTEM\PSQL('/pgsql/data/system_page.sql'))->SERVERPATH());}
|
||||
|
||||
/**
|
||||
* Get paths of MYSQL compatible sql files
|
||||
@ -36,5 +36,5 @@ class DATA_SYSTEM_PAGE extends \SYSTEM\DB\QI {
|
||||
* @return array Returns paths of MYSQL compatible sql files
|
||||
*/
|
||||
public static function files_mysql(){
|
||||
return array( (new \SYSTEM\PSQL('/qt/mysql/data/system_page.sql'))->SERVERPATH());}
|
||||
return array( (new \SYSTEM\PSQL('/mysql/data/system_page.sql'))->SERVERPATH());}
|
||||
}
|
||||
@ -28,7 +28,7 @@ class DATA_SYSTEM_RIGHTS extends \SYSTEM\DB\QI {
|
||||
* @return array Returns paths of PostgreSQL compatible sql files
|
||||
*/
|
||||
public static function files_pgsql(){
|
||||
return array( (new \SYSTEM\PSQL('/qt/pgsql/data/system_rights.sql'))->SERVERPATH());}
|
||||
return array( (new \SYSTEM\PSQL('/pgsql/data/system_rights.sql'))->SERVERPATH());}
|
||||
|
||||
/**
|
||||
* Get paths of MYSQL compatible sql files
|
||||
@ -36,5 +36,5 @@ class DATA_SYSTEM_RIGHTS extends \SYSTEM\DB\QI {
|
||||
* @return array Returns paths of MYSQL compatible sql files
|
||||
*/
|
||||
public static function files_mysql(){
|
||||
return array( (new \SYSTEM\PSQL('/qt/mysql/data/system_rights.sql'))->SERVERPATH());}
|
||||
return array( (new \SYSTEM\PSQL('/mysql/data/system_rights.sql'))->SERVERPATH());}
|
||||
}
|
||||
@ -28,7 +28,7 @@ class DATA_SYSTEM_TEXT extends \SYSTEM\DB\QI {
|
||||
* @return array Returns paths of PostgreSQL compatible sql files
|
||||
*/
|
||||
public static function files_pgsql(){
|
||||
return array( (new \SYSTEM\PSQL('/qt/pgsql/data/system_text.sql'))->SERVERPATH());}
|
||||
return array( (new \SYSTEM\PSQL('/pgsql/data/system_text.sql'))->SERVERPATH());}
|
||||
|
||||
/**
|
||||
* Get paths of MYSQL compatible sql files
|
||||
@ -36,5 +36,5 @@ class DATA_SYSTEM_TEXT extends \SYSTEM\DB\QI {
|
||||
* @return array Returns paths of MYSQL compatible sql files
|
||||
*/
|
||||
public static function files_mysql(){
|
||||
return array( (new \SYSTEM\PSQL('/qt/mysql/data/system_text.sql'))->SERVERPATH());}
|
||||
return array( (new \SYSTEM\PSQL('/mysql/data/system_text.sql'))->SERVERPATH());}
|
||||
}
|
||||
65
sql/SCHEMA_SYSTEM.php
Normal file
65
sql/SCHEMA_SYSTEM.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* System - PHP Framework
|
||||
*
|
||||
* PHP Version 5.6
|
||||
*
|
||||
* @copyright 2016 Ulf Gebhardt (http://www.webcraft-media.de)
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link https://github.com/webcraftmedia/system
|
||||
* @package SYSTEM\SQL
|
||||
*/
|
||||
namespace SYSTEM\SQL;
|
||||
|
||||
/**
|
||||
* SCHEMA_SYSTEM Class provided by System to install the Database Schema for system
|
||||
*/
|
||||
class SCHEMA_SYSTEM extends \SYSTEM\DB\QI {
|
||||
/**
|
||||
* Get Classname of the QQ
|
||||
*
|
||||
* @return string Returns classname
|
||||
*/
|
||||
public static function get_class(){return \get_class();}
|
||||
|
||||
/**
|
||||
* Get paths of PostgreSQL compatible sql files
|
||||
*
|
||||
* @return array Returns paths of PostgreSQL compatible sql files
|
||||
*/
|
||||
public static function files_pgsql(){
|
||||
return array( (new \SYSTEM\PSQL('/pgsql/schema/system_api.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/pgsql/schema/system_cache.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/pgsql/schema/system_cron.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/pgsql/schema/system_log.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/pgsql/schema/system_page.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/pgsql/schema/system_rights.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/pgsql/schema/system_text.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/pgsql/schema/system_text_tag.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/pgsql/schema/system_todo.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/pgsql/schema/system_todo_assign.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/pgsql/schema/system_user.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/pgsql/schema/system_user_to_rights.sql'))->SERVERPATH());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get paths of MYSQL compatible sql files
|
||||
*
|
||||
* @return array Returns paths of MYSQL compatible sql files
|
||||
*/
|
||||
public static function files_mysql(){
|
||||
return array( (new \SYSTEM\PSQL('/mysql/schema/system_api.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/mysql/schema/system_cache.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/mysql/schema/system_cron.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/mysql/schema/system_log.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/mysql/schema/system_page.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/mysql/schema/system_rights.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/mysql/schema/system_text.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/mysql/schema/system_text_tag.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/mysql/schema/system_todo.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/mysql/schema/system_todo_assign.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/mysql/schema/system_token.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/mysql/schema/system_user.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/mysql/schema/system_user_to_rights.sql'))->SERVERPATH());
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SYSTEM\SQL');
|
||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/tbl','SYSTEM\SQL');
|
||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/qt','SYSTEM\SQL');
|
||||
|
||||
\SYSTEM\SQL\setup::register('\SYSTEM\\SQL\\SCHEMA_SYSTEM');
|
||||
|
||||
@ -9,4 +8,5 @@
|
||||
\SYSTEM\SQL\setup::register('\SYSTEM\\SQL\\DATA_SYSTEM_CRON');
|
||||
\SYSTEM\SQL\setup::register('\SYSTEM\\SQL\\DATA_SYSTEM_PAGE');
|
||||
\SYSTEM\SQL\setup::register('\SYSTEM\\SQL\\DATA_SYSTEM_RIGHTS');
|
||||
\SYSTEM\SQL\setup::register('\SYSTEM\\SQL\\DATA_SYSTEM_TEXT');
|
||||
\SYSTEM\SQL\setup::register('\SYSTEM\\SQL\\DATA_SYSTEM_TEXT');
|
||||
\SYSTEM\SQL\setup::register('\SYSTEM\\SQL\\DATA_DEFAULT');
|
||||
7
sql/mysql/data/default.sql
Normal file
7
sql/mysql/data/default.sql
Normal file
@ -0,0 +1,7 @@
|
||||
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('meta_start_author', 'deDE', 'Author', 1, 1, '2017-06-08 21:23:49', '2017-06-08 21:23:49');
|
||||
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('meta_start_description', 'deDE', 'Description', 1, 1, '2017-06-08 21:24:43', '2017-06-08 21:24:43');
|
||||
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('meta_start_keywords', 'deDE', 'Keywords', 1, 1, '2017-06-08 21:25:22', '2017-06-08 21:25:22');
|
||||
|
||||
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('meta_start_keywords', 'meta');
|
||||
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('meta_start_author', 'meta');
|
||||
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('meta_start_description', 'meta');
|
||||
@ -1,65 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* System - PHP Framework
|
||||
*
|
||||
* PHP Version 5.6
|
||||
*
|
||||
* @copyright 2016 Ulf Gebhardt (http://www.webcraft-media.de)
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link https://github.com/webcraftmedia/system
|
||||
* @package SYSTEM\SQL
|
||||
*/
|
||||
namespace SYSTEM\SQL;
|
||||
|
||||
/**
|
||||
* SCHEMA_SYSTEM Class provided by System to install the Database Schema for system
|
||||
*/
|
||||
class SCHEMA_SYSTEM extends \SYSTEM\DB\QI {
|
||||
/**
|
||||
* Get Classname of the QQ
|
||||
*
|
||||
* @return string Returns classname
|
||||
*/
|
||||
public static function get_class(){return \get_class();}
|
||||
|
||||
/**
|
||||
* Get paths of PostgreSQL compatible sql files
|
||||
*
|
||||
* @return array Returns paths of PostgreSQL compatible sql files
|
||||
*/
|
||||
public static function files_pgsql(){
|
||||
return array( (new \SYSTEM\PSQL('/qt/pgsql/schema/system_api.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/pgsql/schema/system_cache.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/pgsql/schema/system_cron.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/pgsql/schema/system_log.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/pgsql/schema/system_page.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/pgsql/schema/system_rights.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/pgsql/schema/system_text.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/pgsql/schema/system_text_tag.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/pgsql/schema/system_todo.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/pgsql/schema/system_todo_assign.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/pgsql/schema/system_user.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/pgsql/schema/system_user_to_rights.sql'))->SERVERPATH());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get paths of MYSQL compatible sql files
|
||||
*
|
||||
* @return array Returns paths of MYSQL compatible sql files
|
||||
*/
|
||||
public static function files_mysql(){
|
||||
return array( (new \SYSTEM\PSQL('/qt/mysql/schema/system_api.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/mysql/schema/system_cache.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/mysql/schema/system_cron.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/mysql/schema/system_log.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/mysql/schema/system_page.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/mysql/schema/system_rights.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/mysql/schema/system_text.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/mysql/schema/system_text_tag.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/mysql/schema/system_todo.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/mysql/schema/system_todo_assign.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/mysql/schema/system_token.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/mysql/schema/system_user.sql'))->SERVERPATH(),
|
||||
(new \SYSTEM\PSQL('/qt/mysql/schema/system_user_to_rights.sql'))->SERVERPATH());
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user