This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Domain\Doctrine\DBAL\Platforms; | |
| use Doctrine\DBAL\Platforms\PostgreSQL100Platform as PostgreSqlPlatformBase; | |
| class PostgreSqlPlatform extends PostgreSqlPlatformBase | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- saving here for later reference incase I decide to complicate things, decided to just use foreign keys | |
| create table user_groups { | |
| id bigint PRIMARY KEY default id_generator(), | |
| account_id bigint not null references accounts(id) on delete cascade on update cascade, | |
| updated_at timestamptz, | |
| name citext not null | |
| } | |
| CREATE TYPE notification_level AS ENUM ('change', 'complete', 'digest', 'all'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| upstream warehouse_inventory { | |
| zone inventory_service 64k; | |
| server 10.0.0.1:80; | |
| server 10.0.0.2:80; | |
| server 10.0.0.3:80; | |
| } | |
| upstream warehouse_pricing { | |
| zone pricing_service 64k; | |
| server 10.0.0.7:80; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Route::get('redis', array('as' => 'cache', 'do' => function() | |
| { | |
| $redis = Redis::connection(); | |
| //STRING | |
| $redis->set('name', 'Taylor'); | |
| $name = $redis->get('name'); | |
| // LIST | |
| // A list is a series of ordered values. Some of the important commands for interacting with lists are RPUSH, LPUSH, LLEN, LRANGE, LPOP, and RPOP. |