Merge branch 'develop' of github.com:octobercms/october into develop
This commit is contained in:
commit
e35429cf28
|
|
@ -473,6 +473,17 @@ class Filter extends WidgetBase
|
|||
$this->allScopes[$name] = $scopeObj;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Programatically remove a scope, used for extensibility.
|
||||
* @param string $scopeName Scope name
|
||||
*/
|
||||
public function removeScope($scopeName)
|
||||
{
|
||||
if (isset($this->allScopes[$scopeName])) {
|
||||
unset($this->allScopes[$scopeName]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a filter scope object from name and configuration.
|
||||
|
|
|
|||
|
|
@ -247,14 +247,14 @@
|
|||
if ($el.val().length && $el.val() != prefix)
|
||||
return
|
||||
|
||||
$el.val(prefix)
|
||||
$el.val(prefix).trigger('oc.inputPreset.afterUpdate')
|
||||
|
||||
this.$src = $(options.inputPreset, parent),
|
||||
this.$src.on('keyup', function() {
|
||||
if (self.cancelled)
|
||||
return
|
||||
|
||||
$el.val(prefix + self.formatValue())
|
||||
$el.val(prefix + self.formatValue()).trigger('oc.inputPreset.afterUpdate')
|
||||
})
|
||||
|
||||
this.$el.on('change', function() {
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ class UpdateManager
|
|||
*/
|
||||
public function update()
|
||||
{
|
||||
$firstUp = !Schema::hasTable('migrations');
|
||||
$firstUp = !Schema::hasTable($this->getMigrationTableName());
|
||||
if ($firstUp) {
|
||||
$this->repository->createRepository();
|
||||
$this->note('Migration table created');
|
||||
|
|
@ -337,7 +337,7 @@ class UpdateManager
|
|||
}
|
||||
}
|
||||
|
||||
Schema::dropIfExists('migrations');
|
||||
Schema::dropIfExists($this->getMigrationTableName());
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
@ -874,4 +874,13 @@ class UpdateManager
|
|||
{
|
||||
return base64_encode(hash_hmac('sha512', http_build_query($data, '', '&'), base64_decode($secret), true));
|
||||
}
|
||||
|
||||
//
|
||||
// Internals
|
||||
//
|
||||
|
||||
protected function getMigrationTableName()
|
||||
{
|
||||
return Config::get('database.migrations', 'migrations');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class DbJobs extends Migration
|
|||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('jobs', function (Blueprint $table) {
|
||||
Schema::create($this->getTableName(), function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->bigIncrements('id');
|
||||
$table->string('queue');
|
||||
|
|
@ -22,6 +22,11 @@ class DbJobs extends Migration
|
|||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('jobs');
|
||||
Schema::dropIfExists($this->getTableName());
|
||||
}
|
||||
|
||||
protected function getTableName()
|
||||
{
|
||||
return Config::get('queue.connections.database.table', 'jobs');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class DbFailedJobs extends Migration
|
|||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
Schema::create($this->getTableName(), function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->text('connection');
|
||||
|
|
@ -19,6 +19,11 @@ class DbFailedJobs extends Migration
|
|||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
Schema::dropIfExists($this->getTableName());
|
||||
}
|
||||
|
||||
protected function getTableName()
|
||||
{
|
||||
return Config::get('queue.failed.table', 'failed_jobs');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,24 +10,11 @@ use October\Rain\Database\Updates\Migration;
|
|||
*/
|
||||
class DbSystemTimestampFix extends Migration
|
||||
{
|
||||
protected $coreTables = [
|
||||
'deferred_bindings',
|
||||
'failed_jobs' => 'failed_at',
|
||||
'system_files',
|
||||
'system_event_logs',
|
||||
'system_mail_layouts',
|
||||
'system_mail_templates',
|
||||
'system_plugin_history' => 'created_at',
|
||||
'system_plugin_versions' => 'created_at',
|
||||
'system_request_logs',
|
||||
'system_revisions',
|
||||
];
|
||||
|
||||
public function up()
|
||||
{
|
||||
DbDongle::disableStrictMode();
|
||||
|
||||
foreach ($this->coreTables as $table => $columns) {
|
||||
foreach ($this->getCoreTables() as $table => $columns) {
|
||||
if (is_int($table)) {
|
||||
$table = $columns;
|
||||
$columns = ['created_at', 'updated_at'];
|
||||
|
|
@ -41,4 +28,22 @@ class DbSystemTimestampFix extends Migration
|
|||
{
|
||||
// ...
|
||||
}
|
||||
|
||||
protected function getCoreTables()
|
||||
{
|
||||
$failedJobsTable = Config::get('queue.failed.table', 'failed_jobs');
|
||||
|
||||
return [
|
||||
'deferred_bindings',
|
||||
$failedJobsTable => 'failed_at',
|
||||
'system_files',
|
||||
'system_event_logs',
|
||||
'system_mail_layouts',
|
||||
'system_mail_templates',
|
||||
'system_plugin_history' => 'created_at',
|
||||
'system_plugin_versions' => 'created_at',
|
||||
'system_request_logs',
|
||||
'system_revisions',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue