Skip to content

Commit 3ab52cc

Browse files
author
Andrey Helldar
authored
Merge pull request #12 from TheDragonCode/2.x
Changed namespace
2 parents 945bfec + 56f9cd6 commit 3ab52cc

36 files changed

+104
-208
lines changed

.github/workflows/coverage.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/workflows/phpunit.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ jobs:
1010
matrix:
1111
php: [ "7.3", "7.4", "8.0" ]
1212
laravel: [ "8.0" ]
13-
support: [ "2.0", "3.0", "4.0" ]
14-
psql: [ "9-alpine", "10-alpine", "11-alpine", "12-alpine", "13-alpine" ]
13+
psql: [ "9", "10", "11", "12", "13", "14" ]
1514

16-
name: php ${{ matrix.php }}, l ${{ matrix.laravel }}, s ${{ matrix.support }}, pg ${{ matrix.psql }}
15+
name: php ${{ matrix.php }}, l ${{ matrix.laravel }}, pg ${{ matrix.psql }}
1716

1817
services:
1918
mysql:
@@ -26,7 +25,7 @@ jobs:
2625
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
2726

2827
postgres:
29-
image: postgres:${{ matrix.psql }}
28+
image: postgres:${{ matrix.psql }}-alpine
3029
ports:
3130
- 5432:5432
3231
env:
@@ -43,11 +42,10 @@ jobs:
4342
with:
4443
php-version: ${{ matrix.php }}
4544
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, redis, pdo_mysql, pdo_pgsql
46-
tools: composer:v2
4745
coverage: none
4846

4947
- name: Install dependencies
50-
run: composer require laravel/framework:^${{ matrix.laravel }} andrey-helldar/support:^${{ matrix.support }}
48+
run: composer require --dev laravel/framework:^${{ matrix.laravel }}
5149

5250
- name: Execute tests
5351
run: sudo vendor/bin/phpunit

README.md

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,39 @@
11
# Migrate DB
22

3-
Easy data transfer from one database to another
4-
53
<img src="https://preview.dragon-code.pro/TheDragonCode/migrate-db.svg?brand=laravel" alt="Migrate DB"/>
64

7-
[![StyleCI Status][badge_styleci]][link_styleci]
8-
[![Github Workflow Status][badge_build]][link_build]
9-
[![Coverage Status][badge_coverage]][link_scrutinizer]
10-
[![Scrutinizer Code Quality][badge_quality]][link_scrutinizer]
11-
125
[![Stable Version][badge_stable]][link_packagist]
136
[![Unstable Version][badge_unstable]][link_packagist]
147
[![Total Downloads][badge_downloads]][link_packagist]
8+
[![Github Workflow Status][badge_build]][link_build]
159
[![License][badge_license]][link_license]
1610

11+
> Easy data transfer from one database to another
12+
1713
## Installation
1814

1915
To get the latest version of `Migrate DB`, simply require the project using [Composer](https://getcomposer.org):
2016

2117
```bash
22-
$ composer require andrey-helldar/migrate-db --dev
18+
$ composer require dragon-code/migrate-db --dev
2319
```
2420

2521
Or manually update `require-dev` block of `composer.json` and run `composer update`.
2622

2723
```json
2824
{
2925
"require-dev": {
30-
"andrey-helldar/migrate-db": "^1.1"
26+
"dragon-code/migrate-db": "^2.0"
3127
}
3228
}
3329
```
3430

31+
### Upgrade from `andrey-helldar/migrate-db`
32+
33+
1. In your `composer.json` file, replace `"andrey-helldar/migrate-db": "^1.0"` with `"dragon-code/migrate-db": "^2.0"`.
34+
2. Run the `command composer` update.
35+
3. Profit!
36+
3537
## Compatibility
3638

3739
| Service | Versions |
@@ -43,7 +45,7 @@ Or manually update `require-dev` block of `composer.json` and run `composer upda
4345
## Using
4446

4547
Create a new database and set up both connections in the `connections` section of
46-
the [config/database.php](https://github.com/laravel/laravel/blob/8.x/config/database.php) file, then run the `db:migrate` console command passing two
48+
the [config/database.php](https://github.com/laravel/laravel/blob/master/config/database.php) file, then run the `db:migrate` console command passing two
4749
parameters:
4850

4951
```bash
@@ -65,36 +67,18 @@ Enjoy 😊
6567
This package is licensed under the [MIT License](LICENSE).
6668

6769

68-
## For Enterprise
69-
70-
Available as part of the Tidelift Subscription.
71-
72-
The maintainers of `andrey-helldar/migrate-db` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more](https://tidelift.com/subscription/pkg/packagist-andrey-helldar-migrate-db?utm_source=packagist-andrey-helldar-migrate-db&utm_medium=referral&utm_campaign=enterprise&utm_term=repo).
70+
[badge_build]: https://img.shields.io/github/workflow/status/dragon-code/migrate-db/phpunit?style=flat-square
7371

72+
[badge_downloads]: https://img.shields.io/packagist/dt/dragon-code/migrate-db.svg?style=flat-square
7473

74+
[badge_license]: https://img.shields.io/packagist/l/dragon-code/migrate-db.svg?style=flat-square
7575

76-
[badge_build]: https://img.shields.io/github/workflow/status/andrey-helldar/migrate-db/phpunit?style=flat-square
77-
78-
[badge_coverage]: https://img.shields.io/scrutinizer/coverage/g/andrey-helldar/migrate-db.svg?style=flat-square
79-
80-
[badge_downloads]: https://img.shields.io/packagist/dt/andrey-helldar/migrate-db.svg?style=flat-square
81-
82-
[badge_license]: https://img.shields.io/packagist/l/andrey-helldar/migrate-db.svg?style=flat-square
83-
84-
[badge_quality]: https://img.shields.io/scrutinizer/g/andrey-helldar/migrate-db.svg?style=flat-square
85-
86-
[badge_stable]: https://img.shields.io/github/v/release/andrey-helldar/migrate-db?label=stable&style=flat-square
87-
88-
[badge_styleci]: https://styleci.io/repos/338000763/shield
76+
[badge_stable]: https://img.shields.io/github/v/release/dragon-code/migrate-db?label=stable&style=flat-square
8977

9078
[badge_unstable]: https://img.shields.io/badge/unstable-dev--main-orange?style=flat-square
9179

92-
[link_build]: https://github.com/andrey-helldar/migrate-db/actions
80+
[link_build]: https://github.com/dragon-code/migrate-db/actions
9381

9482
[link_license]: LICENSE
9583

96-
[link_packagist]: https://packagist.org/packages/andrey-helldar/migrate-db
97-
98-
[link_scrutinizer]: https://scrutinizer-ci.com/g/andrey-helldar/migrate-db/?branch=main
99-
100-
[link_styleci]: https://github.styleci.io/repos/338000763
84+
[link_packagist]: https://packagist.org/packages/dragon-code/migrate-db

SECURITY.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

composer.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "andrey-helldar/migrate-db",
2+
"name": "dragon-code/migrate-db",
33
"description": "Easy data transfer from one database to another",
44
"type": "library",
55
"license": "MIT",
@@ -8,7 +8,10 @@
88
"migrating",
99
"migration",
1010
"move",
11-
"transfer"
11+
"transfer",
12+
"dragon-code",
13+
"dragon",
14+
"andrey-helldar"
1215
],
1316
"authors": [
1417
{
@@ -17,13 +20,14 @@
1720
}
1821
],
1922
"support": {
20-
"issues": "https://github.com/andrey-helldar/migrate-db/issues",
21-
"source": "https://github.com/andrey-helldar/migrate-db"
23+
"issues": "https://github.com/TheDragonCode/migrate-db/issues",
24+
"source": "https://github.com/TheDragonCode/migrate-db"
2225
},
2326
"require": {
2427
"php": "^7.3|^8.0",
2528
"ext-pdo": "*",
26-
"andrey-helldar/support": "^2.15|^3.0|^4.0",
29+
"dragon-code/contracts": "^2.8",
30+
"dragon-code/support": "^5.0",
2731
"illuminate/contracts": "^8.0",
2832
"illuminate/database": "^8.0",
2933
"illuminate/support": "^8.0"
@@ -37,7 +41,7 @@
3741
},
3842
"autoload": {
3943
"psr-4": {
40-
"Helldar\\MigrateDB\\": "src"
44+
"DragonCode\\MigrateDB\\": "src"
4145
}
4246
},
4347
"autoload-dev": {
@@ -54,7 +58,7 @@
5458
"extra": {
5559
"laravel": {
5660
"providers": [
57-
"Helldar\\MigrateDB\\ServiceProvider"
61+
"DragonCode\\MigrateDB\\ServiceProvider"
5862
]
5963
}
6064
}

src/Console/Migrate.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
<?php
22

3-
namespace Helldar\MigrateDB\Console;
3+
namespace DragonCode\MigrateDB\Console;
44

5-
use Helldar\MigrateDB\Contracts\Database\Builder;
6-
use Helldar\MigrateDB\Exceptions\InvalidArgumentException;
7-
use Helldar\MigrateDB\Facades\BuilderManager;
8-
use Helldar\Support\Facades\Helpers\Arr;
5+
use DragonCode\Contracts\MigrateDB\Builder;
6+
use DragonCode\MigrateDB\Exceptions\InvalidArgumentException;
7+
use DragonCode\MigrateDB\Facades\BuilderManager;
8+
use DragonCode\Support\Facades\Helpers\Arr;
99
use Illuminate\Console\Command;
1010
use Illuminate\Database\Query\Builder as QueryBuilder;
1111
use Illuminate\Support\Collection;
1212
use Illuminate\Support\Facades\DB;
1313

14-
final class Migrate extends Command
14+
class Migrate extends Command
1515
{
1616
protected $signature = 'db:migrate'
1717
. ' {--schema-from= : Source connection name}'
1818
. ' {--schema-to= : Target connection name}';
1919

2020
protected $description = 'Data transfer from one database to another';
2121

22-
/** @var \Helldar\MigrateDB\Contracts\Database\Builder */
22+
/** @var \DragonCode\Contracts\MigrateDB\Builder */
2323
protected $source;
2424

25-
/** @var \Helldar\MigrateDB\Contracts\Database\Builder */
25+
/** @var \DragonCode\Contracts\MigrateDB\Builder */
2626
protected $target;
2727

2828
public function handle()

src/Constants/Drivers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
namespace Helldar\MigrateDB\Constants;
3+
namespace DragonCode\MigrateDB\Constants;
44

5-
final class Drivers
5+
class Drivers
66
{
77
public const MYSQL = 'mysql';
88

src/Contracts/Database/Builder.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/Database/Builder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Helldar\MigrateDB\Database;
3+
namespace DragonCode\MigrateDB\Database;
44

5-
use Helldar\MigrateDB\Contracts\Database\Builder as BuilderContract;
6-
use Helldar\Support\Concerns\Makeable;
5+
use DragonCode\Contracts\MigrateDB\Builder as BuilderContract;
6+
use DragonCode\Support\Concerns\Makeable;
77
use Illuminate\Database\Connection;
88
use Illuminate\Database\Schema\Builder as SchemaBuilder;
99
use Illuminate\Support\Arr;

src/Database/Manager.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<?php
22

3-
namespace Helldar\MigrateDB\Database;
3+
namespace DragonCode\MigrateDB\Database;
44

5-
use Helldar\MigrateDB\Constants\Drivers;
6-
use Helldar\MigrateDB\Contracts\Database\Builder as BuilderContract;
5+
use DragonCode\Contracts\MigrateDB\Builder as BuilderContract;
6+
use DragonCode\MigrateDB\Constants\Drivers;
77
use Illuminate\Container\Container;
88
use Illuminate\Database\Connection;
99
use Illuminate\Database\Connectors\ConnectionFactory;
1010
use Illuminate\Support\Arr;
1111
use Illuminate\Support\Facades\Config;
1212
use InvalidArgumentException;
1313

14-
final class Manager
14+
class Manager
1515
{
1616
protected $connection;
1717

@@ -36,7 +36,7 @@ public function get(): BuilderContract
3636
}
3737

3838
/**
39-
* @return \Helldar\MigrateDB\Database\Builder|string
39+
* @return \DragonCode\MigrateDB\Database\Builder|string
4040
*/
4141
protected function getBuilder(): string
4242
{

0 commit comments

Comments
 (0)