forked from ceardach/dbscripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathraise_increments.php
More file actions
executable file
·24 lines (24 loc) · 889 Bytes
/
Copy pathraise_increments.php
File metadata and controls
executable file
·24 lines (24 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env php
<?php
require('dbscripts.module');
if (in_array('help', $_SERVER['argv'])) {
print dbscripts_help('raise_increments');
} else {
$options = $_SERVER['argv'];
if (isset($options[1]) && $options[1] != 'all') {
if (isset($options[3])) {
$table = $options[1];
$start_at = $options[2];
$change_to = $options[3];
$branch = isset($options[4]) ? $options[4] : 'development';
$filter_option = isset($options[5]) ? $options[5] : 'full';
$options = _dbscripts_get_options($_SERVER['argv'],'raise');
print dbscripts_raise_table_increments($table, $start_at, $change_to, $branch, $filter_option);
} else {
print "\n\nMust provide a table, increment to start at, and increment to change to\n\n";
}
} else {
print dbscripts_raise_all_increments($_SERVER['argv']);
}
}
?>