Remove SET autocommit=0 in base.sql

- Fixes https://github.com/friendica/friendica-directory/issues/12
- Add transactions in SQL migration scripts
stable
Hypolite Petovan 4 years ago
parent b74921b5d8
commit 1960634797
  1. 2
      src/sql/base.sql
  2. 6
      src/sql/migrations/down/0000.sql
  3. 6
      src/sql/migrations/down/0002.sql
  4. 6
      src/sql/migrations/up/0001.sql
  5. 2
      src/sql/migrations/up/0002.sql
  6. 2
      src/sql/migrations/up/0003.sql

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

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

@ -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;

@ -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 `server` ADD `language` VARCHAR(30) NULL AFTER `name`;
COMMIT;

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

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

Loading…
Cancel
Save