Skip to content

Commit

Permalink
v8.0.0-rc.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rijkvanzanten committed Nov 13, 2019
1 parent a147dbe commit bc48434
Show file tree
Hide file tree
Showing 1,527 changed files with 7,716 additions and 17,720 deletions.
5 changes: 3 additions & 2 deletions composer.json
Expand Up @@ -10,7 +10,7 @@
],
"require": {
"php": "^7.1",
"slim/slim": "^3.0.0",
"slim/slim": "^3.12.2",
"monolog/monolog": "^1.23.0",
"zendframework/zend-db": "dev-directus",
"league/flysystem": "^1.0",
Expand Down Expand Up @@ -41,7 +41,8 @@
"ext-gd": "*",
"webonyx/graphql-php": "^0.13.0",
"char0n/ffmpeg-php": "^3.0.0",
"pragmarx/google2fa": "^5.0"
"pragmarx/google2fa": "^5.0",
"guzzlehttp/guzzle": "~6.0"
},
"suggest": {
"paragonie/random_compat": "Generates cryptographically more secure pseudo-random bytes",
Expand Down
5 changes: 5 additions & 0 deletions config/api_sample.php
Expand Up @@ -24,6 +24,11 @@
// When using unix socket to connect to the database the host attribute should be removed
// 'socket' => '/var/lib/mysql/mysql.sock',
'socket' => '',
// Connect over TLS by using the appropriate PDO_MySQL constants:
// https://www.php.net/manual/en/ref.pdo-mysql.php#pdo-mysql.constants
//'driver_options' => [
// PDO::MYSQL_ATTR_SSL_CAPATH => '/etc/ssl/certs',
//]
],

'cache' => [
Expand Down

This file was deleted.

4 changes: 4 additions & 0 deletions migrations/db/schemas/20180220023217_create_roles_table.php
Expand Up @@ -55,6 +55,10 @@ public function change()
'null' => true,
'default' => null
]);
$table->addColumn('enforce_2fa', 'boolean', [
'null' => true,
'default' => false
]);

$table->addIndex('name', [
'unique' => true,
Expand Down
9 changes: 8 additions & 1 deletion migrations/db/schemas/20180220023248_create_users_table.php
Expand Up @@ -66,7 +66,7 @@ public function change()
$table->addColumn('locale', 'string', [
'limit' => 8,
'null' => true,
'default' => 'en-US'
'default' => null
]);
$table->addColumn('locale_options', 'text', [
'null' => true,
Expand Down Expand Up @@ -107,6 +107,13 @@ public function change()
'default' => null
]);

$table->addColumn('2fa_secret', 'string', [
'limit' => 100,
'encoding' => 'utf8',
'null' => true,
'default' => null
]);

$table->addIndex('email', [
'unique' => true,
'name' => 'idx_users_email'
Expand Down
76 changes: 76 additions & 0 deletions migrations/db/schemas/20190912072543_create_user_sessions.php
@@ -0,0 +1,76 @@
<?php


use Phinx\Migration\AbstractMigration;

class CreateUserSessions extends AbstractMigration
{
/**
* Change Method.
*
* Write your reversible migrations using this method.
*
* More information on writing migrations is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
*
* The following commands can be used in this method and Phinx will
* automatically reverse them when rolling back:
*
* createTable
* renameTable
* addColumn
* renameColumn
* addIndex
* addForeignKey
*
* Remember to call "create()" or "update()" and NOT "save()" when working
* with the Table class.
*/
public function change()
{
$table = $this->table('directus_user_sessions', ['signed' => false]);

$table->addColumn('user', 'integer', [
'signed' => false,
'null' => true,
'default' => null
]);

$table->addColumn('token_type', 'string', [
'null' => true,
'default' => null
]);

$table->addColumn('token', 'string', [
'limit' => 520,
'encoding' => 'utf8',
'null' => true,
'default' => null
]);

$table->addColumn('ip_address', 'string', [
'limit' => 255,
'encoding' => 'utf8',
'null' => true,
'default' => null
]);

$table->addColumn('user_agent', 'text', [
'default' => null,
'null' => true,
'default' => null
]);

$table->addColumn('created_on', 'datetime', [
'null' => true,
'default' => null
]);

$table->addColumn('token_expired_at', 'datetime', [
'null' => true,
'default' => null
]);

$table->create();
}
}
68 changes: 68 additions & 0 deletions migrations/db/schemas/20190917090849_create_web_hooks.php
@@ -0,0 +1,68 @@
<?php


use Phinx\Migration\AbstractMigration;

class CreateWebHooks extends AbstractMigration
{
/**
* Change Method.
*
* Write your reversible migrations using this method.
*
* More information on writing migrations is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
*
* The following commands can be used in this method and Phinx will
* automatically reverse them when rolling back:
*
* createTable
* renameTable
* addColumn
* renameColumn
* addIndex
* addForeignKey
*
* Remember to call "create()" or "update()" and NOT "save()" when working
* with the Table class.
*/
public function change()
{
$table = $this->table('directus_webhooks', ['signed' => false]);

$table->addColumn('status', 'string', [
'limit' => 16,
'default' => \Directus\Api\Routes\Webhook::STATUS_INACTIVE
]);


$table->addColumn('http_action', 'string', [
'limit' => 255,
'encoding' => 'utf8',
'null' => true,
'default' => null
]);

$table->addColumn('url', 'string', [
'limit' => 510,
'encoding' => 'utf8',
'null' => true,
'default' => null
]);

$table->addColumn('collection', 'string', [
'limit' => 255,
'null' => true,
'default' => null
]);

$table->addColumn('directus_action', 'string', [
'limit' => 255,
'encoding' => 'utf8',
'null' => true,
'default' => null
]);

$table->create();
}
}
21 changes: 20 additions & 1 deletion migrations/db/seeds/CollectionPresetsSeeder.php
Expand Up @@ -17,7 +17,6 @@ public function run()
$data = [
[
'collection' => 'directus_activity',
'view_type' => 'tabular',
'view_type' => 'timeline',
'view_query' => json_encode([
'timeline' => [
Expand Down Expand Up @@ -57,6 +56,26 @@ public function run()
'icon' => 'person'
]
])
],
[
'collection' => 'directus_webhooks',
'view_type' => 'tabular',
'view_query' => json_encode([
'tabular' => [
'fields' => 'status,http_action,url,collection,directus_action'
]
]),
'view_options' => json_encode([
'tabular' => [
'widths' => [
'status' => 32,
'http_action' => 72,
'url' => 200,
'collection' => 200,
'directus_action' => 200
]
]
])
]
];

Expand Down

0 comments on commit bc48434

Please sign in to comment.