mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#4601 Membership Resources Report
This commit is contained in:
parent
96c370dd34
commit
c4a727fe13
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Anomaly\Streams\Platform\Database\Migration\Migration;
|
||||
|
||||
class VisiosoftModuleProfileCreateUtmSourceField extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
if (!$this->fields()->findBySlugAndNamespace('utm_source', 'users')) {
|
||||
$field = $this->fields()
|
||||
->create(
|
||||
[
|
||||
'slug' => 'utm_source',
|
||||
'namespace' => 'users',
|
||||
'type' => 'anomaly.field_type.text',
|
||||
'name' => 'visiosoft.module.profile::field.utm_source.name',
|
||||
'locked' => false,
|
||||
]
|
||||
);
|
||||
|
||||
$stream = $this->streams()->findBySlugAndNamespace('users', 'users');
|
||||
|
||||
$this->assignments()
|
||||
->create(
|
||||
[
|
||||
'field' => $field,
|
||||
'stream' => $stream,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
if ($field = $this->fields()->findBySlugAndNamespace('utm_source', 'users')) {
|
||||
$field->delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user