Cli
Push
Push
push
Push migrations to the project and apply predefined data.
Usage
nailgun push [options]Options
-d, --dryRun- Dry run and show interactive prompts
Description
The push command applies migrations to your project and handles predefined data. It's similar to migrate but includes additional steps for pushing changes and applying fixtures.
What It Does
- Starts up the Zodula server
- Pushes migrations to the project
- Applies predefined data
- Applies fixtures (sample data)
- Handles database schema updates
Dry Run Mode
Use the --dryRun option to preview what changes will be made without actually applying them:
nailgun push --dryRunThis will:
- Show you what migrations will be applied
- Display interactive prompts for confirmation
- Not make any actual changes to the database
Example
$ nailgun push
✓ Starting up server...
✓ Pushing migrations...
✓ Applying predefine...
✓ Applying fixtures...
✓ Push completed successfullyWhen to Use
Use push when:
- You want to apply migrations with additional data setup
- You need to apply predefined system data
- You want to ensure fixtures are applied
- You're setting up a fresh environment
- You need to sync database changes
Difference from Migrate
While migrate focuses on schema changes, push includes:
- Predefined Data: Applies system-level predefined data
- Fixtures: Ensures sample data is applied
- Additional Setup: Handles extra configuration steps
Important Notes
- The command will exit after completion
- Changes are applied to the main database
- Predefined data is applied within a transaction
- Fixtures are applied after migrations
Tips
- Use
--dryRunto preview changes first - Run
pushafter major schema changes - Ensure your database is accessible
- Consider backing up before running
push - Test in development before production
Troubleshooting
If push fails:
- Check the error messages in the terminal
- Ensure your database is accessible
- Verify migration files are valid
- Check for any data conflicts
- Consider restoring from backup if needed
Zodula