| 125 | } |
| 126 | |
| 127 | type Migrate struct { |
| 128 | sourceName string |
| 129 | sourceURL string |
| 130 | sourceDrv source.Driver |
| 131 | |
| 132 | databaseName string |
| 133 | databaseURL string |
| 134 | databaseDrv database.Driver |
| 135 | |
| 136 | // Logger is the global logger object to print logs. |
| 137 | Logger *log.Logger |
| 138 | stderr io.Writer |
| 139 | stdout io.Writer |
| 140 | |
| 141 | // GracefulStop accepts `true` and will stop executing migrations |
| 142 | // as soon as possible at a safe break point, so that the database |
| 143 | // is not corrupted. |
| 144 | GracefulStop chan bool |
| 145 | isGracefulStop bool |
| 146 | |
| 147 | isLockedMu *sync.Mutex |
| 148 | isLocked bool |
| 149 | |
| 150 | // PrefetchMigrations defaults to DefaultPrefetchMigrations, |
| 151 | // but can be set per Migrate instance. |
| 152 | PrefetchMigrations uint64 |
| 153 | |
| 154 | // LockTimeout defaults to DefaultLockTimeout, |
| 155 | // but can be set per Migrate instance. |
| 156 | LockTimeout time.Duration |
| 157 | |
| 158 | //CMD |
| 159 | isCMD bool |
| 160 | |
| 161 | status *Status |
| 162 | |
| 163 | SkipExecution bool |
| 164 | DryRun bool |
| 165 | ProgressBarLogs bool |
| 166 | NoTransaction bool |
| 167 | } |
| 168 | |
| 169 | type NewMigrateOpts struct { |
| 170 | sourceUrl, databaseUrl string |
nothing calls this directly
no outgoing calls
no test coverage detected