diff --git a/src/MigrateDB/Builder.php b/src/MigrateDB/Builder.php new file mode 100644 index 0000000..93a85c9 --- /dev/null +++ b/src/MigrateDB/Builder.php @@ -0,0 +1,43 @@ + + * + * @copyright 2021 Andrey Helldar + * + * @license MIT + * + * @see https://github.com/TheDragonCode/contracts + */ + +declare(strict_types=1); + +namespace DragonCode\Contracts\MigrateDB; + +use Illuminate\Database\Connection; +use Illuminate\Database\Schema\Builder as SchemaBuilder; + +interface Builder +{ + public function __construct(Connection $connection); + + /** + * @return \Illuminate\Database\Schema\Builder|\Illuminate\Database\Schema\MySqlBuilder|\Illuminate\Database\Schema\PostgresBuilder + */ + public function schema(): SchemaBuilder; + + public function getPrimaryKey(string $table): string; + + public function getAllTables(): array; + + public function dropAllTables(): void; + + public function disableForeign(): void; + + public function enableForeign(): void; +}