patch mysql5.7的create table

This commit is contained in:
guange 2016-03-01 16:13:13 +08:00
parent e487b39d16
commit 445bae6de9
3 changed files with 41 additions and 0 deletions

View File

View File

@ -0,0 +1,3 @@
class ActiveRecord::ConnectionAdapters::Mysql2Adapter
NATIVE_DATABASE_TYPES[:primary_key] = "int(11) auto_increment PRIMARY KEY"
end

View File

@ -0,0 +1,38 @@
$(function(){
window.byAlert = function(info, title){
if(typeof title === 'undefined'){
title = '提示';
}
$('.weui_dialog_alert .weui_dialog_title').text(title);
$('.weui_dialog_alert .weui_dialog_info').text(info);
var $dialog = $('#dialog2');
$dialog.show();
$dialog.find('.weui_btn_dialog').one('click', function () {
$dialog.hide();
});
};
window.byConfirm = function(info, cb){
var title;
if(typeof title === 'undefined'){
title = '提示';
}
$('.weui_dialog_confirm .weui_dialog_title').text(title);
$('.weui_dialog_confirm .weui_dialog_info').text(info);
var $dialog = $('#dialog1');
$dialog.show();
$dialog.find('.weui_btn_dialog.confirm').one('click', function () {
$dialog.hide();
if(typeof cb === 'function'){
cb();
}
});
$dialog.find('.weui_btn_dialog.cancel').one('click', function () {
$dialog.hide();
});
}
});