Welcome Guest, Not a member yet? Register   Sign In
What is accuracy to safely use CI migration ?
#1

Hi guys!
I use CI migration as I followed its instructions but I don't understand where am wrong as this scenario I get the following issues:Smile
PHP Code:
PHP spark migrate
PHP spark migrate 
--all/*work fine*/
PHP spark migrate name/*not work*/
PHP spark migraterefresh/*work fine*/
PHP spark migraterefresh --all/*not working*/
PHP spark migraterefresh --single/*refresh all but I want only single?*/ [color=#FF4136]why?[/color]
PHP spark migrate:rollback --all/*roll back all*/
PHP spark migrate:rollback --single/*roll back all but I want single?*/[color=#FF4136]why?[/color] 
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply
#2

(This post was last modified: 04-02-2022, 04:40 PM by kenjis.)

There is no `--single` option.
See https://codeigniter4.github.io/userguide...line-tools

If `php spark migrate:refresh --all` does not work, it is a bug.
What did you get?
Reply
#3

(This post was last modified: 04-02-2022, 10:48 PM by luckmoshy.)

(04-02-2022, 04:38 PM)kenjis Wrote: There is no `--single` option.
See https://codeigniter4.github.io/userguide...line-tools

If `php spark migrates: refresh --all` does not work, it is a bug.
What did you get?


@kenjis single I meant the name of migration per one like (anonymous name)

PHP Code:
PHP spark migraterefresh test/*Here instead of refreshing only one migration it does for all migrations why?*/ 


I have 6 migration file
in short, I want to  do like =eg(create =migrate,update=refresh and delete=rollback) for  single migration file
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply
#4

(This post was last modified: 04-03-2022, 12:22 AM by kenjis.)

@luckmoshy The Migration dose not work as you expected.
It is the point you misunderstanding.

The migration is like simple or stupid Git repository.
`spark migrate` is like `git commit`.

How many migration files you have, when you run `spark migrate`,
the migration executes all migration files, and create a batch number starting from 1.

When you run `spark migrate` again,
the migration executes all new migration files, and create a batch number 2.

You can see the batch numbers:
Code:
$ php spark migrate:status

You can go back to the state of arbitrary batch number with `spark migrate:rollback`.
Reply
#5
Wink 

(04-03-2022, 12:20 AM)kenjis Wrote: @luckmoshy The Migration dose not work as you expected.
It is the point you misunderstanding.

The migration is like simple or stupid Git repository.
`spark migrate` is like `git commit`.

How many migration files you have, when you run `spark migrate`,
the migration executes all migration files, and create a batch number starting from 1.

When you run `spark migrate` again,
the migration executes all new migration files, and create a batch number 2.

You can see the batch numbers:
Code:
$ php spark migrate:status

You can go back to the state of an arbitrary batch number with `spark migrate:rollback`.

@kenji here you helped a lot I could not understood before
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply




Theme © iAndrew 2016 - Forum software by © MyBB