@@ -159,10 +159,10 @@ public static function createController(string $namespace, ?string $className, ?
159159 $ context ->appendLine ();
160160 $ context ->appendLine ("namespace {$ namespace }; " );
161161 $ context ->appendLine ();
162- $ context ->appendLine ('use DevNet\Web\Controller\ActionController ; ' );
162+ $ context ->appendLine ('use DevNet\Web\Controller\AbstractController ; ' );
163163 $ context ->appendLine ('use DevNet\Web\Controller\IActionResult; ' );
164164 $ context ->appendLine ();
165- $ context ->appendLine ("class {$ className } extends ActionController " );
165+ $ context ->appendLine ("class {$ className } extends AbstractController " );
166166 $ context ->appendLine ('{ ' );
167167 $ context ->appendLine (' public function index(): IActionResult ' );
168168 $ context ->appendLine (' { ' );
@@ -208,15 +208,10 @@ public static function createMigration(string $namespace, ?string $className, ?s
208208 $ context ->appendLine ('{ ' );
209209 $ context ->appendLine (' public function up(MigrationBuilder $builder): void ' );
210210 $ context ->appendLine (' { ' );
211- $ context ->appendLine (' $builder->createTable( \'MyTable \', function ($table) {; ' );
212- $ context ->appendLine (' $table->column( \'Id \')->type( \'integer \')->identity(); ' );
213- $ context ->appendLine (' $table->primaryKey( \'Id \'); ' );
214- $ context ->appendLine (' }); ' );
215211 $ context ->appendLine (' } ' );
216212 $ context ->appendLine ();
217213 $ context ->appendLine (' public function down(MigrationBuilder $builder): void ' );
218214 $ context ->appendLine (' { ' );
219- $ context ->appendLine (' $builder->dropTable( \'MyTable \'); ' );
220215 $ context ->appendLine (' } ' );
221216 $ context ->appendLine ('} ' );
222217
0 commit comments