是否可以输出ecto中迁移生成的DDL?我会想象一个类似于:
的命令 void normalize(uint8_t array[], unsigned int cols, unsigned int rows) {
uint8_t minValue = min(array, cols, rows);
uint8_t maxValue = max(array, cols, rows);
uint8_t MIN_RANGE = 0;
uint8_t MAX_RANGE = 255;
uint8_t new_range = MAX_RANGE - MIN_RANGE;
uint8_t old_range = maxValue - minValue;
int range = 0;
double scale = 0;
for (range = 0; range < rows * cols; range++) {
scale = (array[range] - minValue) / (old_range);
array[range] = scale * new_range + MIN_RANGE;
}
}
如果我们进行mix ecto.migrate --verbose
迁移,则会输出如下内容:
create_user