Remove SET autocommit=0 in base.sql

- Fixes https://github.com/friendica/friendica-directory/issues/12
- Add transactions in SQL migration scripts
This commit is contained in:
Hypolite Petovan 2018-11-17 07:50:42 -05:00
parent b74921b5d8
commit 1960634797
6 changed files with 16 additions and 8 deletions

View file

@ -1,5 +1,3 @@
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION; START TRANSACTION;
-- -------------------------------------------------------- -- --------------------------------------------------------

View file

@ -1,3 +1,5 @@
ALTER TABLE `server` DROP `language`; BEGIN;
ALTER TABLE `profile` DROP `language`; ALTER TABLE `profile` DROP `language`;
ALTER TABLE `server` DROP `language`;
COMMIT;

View file

@ -1,3 +1,5 @@
ALTER table `profile` DROP KEY `language` (`language`); BEGIN;
ALTER table `profile` DROP KEY `language`;
ALTER table `server` DROP KEY `language` (`language`); ALTER table `server` DROP KEY `language`;
COMMIT;

View file

@ -1,3 +1,5 @@
ALTER TABLE `server` ADD `language` VARCHAR(30) NULL AFTER `name`; BEGIN;
ALTER TABLE `profile` ADD `language` VARCHAR(30) NULL AFTER `account_type`; ALTER TABLE `profile` ADD `language` VARCHAR(30) NULL AFTER `account_type`;
ALTER TABLE `server` ADD `language` VARCHAR(30) NULL AFTER `name`;
COMMIT;

View file

@ -1,2 +1,4 @@
BEGIN;
ALTER table `profile` DROP INDEX `profile-ft`; ALTER table `profile` DROP INDEX `profile-ft`;
ALTER table `profile` ADD FULLTEXT KEY `profile-ft` (`name`, `pdesc`, `profile_url`, `locality`, `region`, `country`, `tags`); ALTER table `profile` ADD FULLTEXT KEY `profile-ft` (`name`, `pdesc`, `profile_url`, `locality`, `region`, `country`, `tags`);
COMMIT;

View file

@ -1,3 +1,5 @@
BEGIN;
ALTER table `profile` ADD KEY `language` (`language`); ALTER table `profile` ADD KEY `language` (`language`);
ALTER table `server` ADD KEY `language` (`language`); ALTER table `server` ADD KEY `language` (`language`);
COMMIT;