Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move DAV app to migrations #6264

Merged
merged 1 commit into from Sep 19, 2017

Conversation

Projects
None yet
3 participants
@rullzer
Copy link
Member

rullzer commented Aug 25, 2017

Need to touch the db schema for #6170
So better first move to migrations.

@nickvergessen

This comment has been minimized.

Copy link
Member

nickvergessen commented Sep 6, 2017

Version on the migration should be 1004 or 1004002 and then the version in info.xml should be increased

@rullzer rullzer force-pushed the dav-migrations branch from 1fca24a to 3e94070 Sep 7, 2017

@rullzer

This comment has been minimized.

Copy link
Member Author

rullzer commented Sep 7, 2017

@MorrisJobke
Copy link
Member

MorrisJobke left a comment

Tested update and install. Both resulted in a working DB structure. 👍

'notnull' => false,
'length' => 255,
]);
$table->addColumn('synctoken', 'integer', [

This comment has been minimized.

Copy link
@nickvergessen

nickvergessen Sep 7, 2017

Member

this changed from 10 to 11 chars Oo
Also all int columns dropped UNSIGNED

@nickvergessen

This comment has been minimized.

Copy link
Member

nickvergessen commented Sep 7, 2017

--- /home/nickv/Schreibtisch/nextcloud13.sql
+++ /home/nickv/Schreibtisch/nextcloud13b.sql
@@ -38,9 +38,9 @@
 --
 
 CREATE TABLE `oc_addressbookchanges` (
-  `id` bigint(20) UNSIGNED NOT NULL,
-  `uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
-  `synctoken` int(10) UNSIGNED NOT NULL DEFAULT '1',
+  `id` bigint(20) NOT NULL,
+  `uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
+  `synctoken` int(11) NOT NULL DEFAULT '1',
   `addressbookid` int(11) NOT NULL,
   `operation` smallint(6) NOT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPRESSED;
@@ -52,12 +52,12 @@
 --
 
 CREATE TABLE `oc_addressbooks` (
-  `id` bigint(20) UNSIGNED NOT NULL,
+  `id` bigint(20) NOT NULL,
   `principaluri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
   `displayname` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
   `uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
   `description` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
-  `synctoken` int(10) UNSIGNED NOT NULL DEFAULT '1'
+  `synctoken` int(11) NOT NULL DEFAULT '1'
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPRESSED;
 
 -- --------------------------------------------------------
@@ -67,9 +67,9 @@
 --
 
 CREATE TABLE `oc_calendarchanges` (
-  `id` bigint(20) UNSIGNED NOT NULL,
-  `uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
-  `synctoken` int(10) UNSIGNED NOT NULL DEFAULT '1',
+  `id` bigint(20) NOT NULL,
+  `uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
+  `synctoken` int(11) NOT NULL DEFAULT '1',
   `calendarid` int(11) NOT NULL,
   `operation` smallint(6) NOT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPRESSED;
@@ -81,18 +81,18 @@
 --
 
 CREATE TABLE `oc_calendarobjects` (
-  `id` bigint(20) UNSIGNED NOT NULL,
+  `id` bigint(20) NOT NULL,
   `calendardata` longblob,
   `uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
-  `calendarid` int(10) UNSIGNED NOT NULL,
-  `lastmodified` int(10) UNSIGNED DEFAULT NULL,
+  `calendarid` int(11) NOT NULL,
+  `lastmodified` int(11) DEFAULT NULL,
   `etag` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL,
-  `size` bigint(20) UNSIGNED NOT NULL,
+  `size` bigint(20) NOT NULL,
   `componenttype` varchar(8) COLLATE utf8mb4_bin DEFAULT NULL,
-  `firstoccurence` bigint(20) UNSIGNED DEFAULT NULL,
-  `lastoccurence` bigint(20) UNSIGNED DEFAULT NULL,
+  `firstoccurence` bigint(20) DEFAULT NULL,
+  `lastoccurence` bigint(20) DEFAULT NULL,
   `uid` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
-  `classification` int(11) DEFAULT '0' COMMENT '0 - public, 1 - private, 2 - confidential'
+  `classification` int(11) DEFAULT '0'
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPRESSED;
 
 -- --------------------------------------------------------
@@ -102,9 +102,9 @@
 --
 
 CREATE TABLE `oc_calendarobjects_props` (
-  `id` bigint(20) UNSIGNED NOT NULL,
+  `id` bigint(20) NOT NULL,
   `calendarid` bigint(20) NOT NULL DEFAULT '0',
-  `objectid` bigint(20) UNSIGNED NOT NULL DEFAULT '0',
+  `objectid` bigint(20) NOT NULL DEFAULT '0',
   `name` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL,
   `parameter` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL,
   `value` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL
@@ -117,13 +117,13 @@
 --
 
 CREATE TABLE `oc_calendars` (
-  `id` bigint(20) UNSIGNED NOT NULL,
+  `id` bigint(20) NOT NULL,
   `principaluri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
   `displayname` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
   `uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
-  `synctoken` int(10) UNSIGNED NOT NULL DEFAULT '1',
+  `synctoken` int(11) NOT NULL DEFAULT '1',
   `description` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
-  `calendarorder` int(10) UNSIGNED NOT NULL DEFAULT '0',
+  `calendarorder` int(11) NOT NULL DEFAULT '0',
   `calendarcolor` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
   `timezone` longtext COLLATE utf8mb4_bin,
   `components` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL,
@@ -137,18 +137,18 @@
 --
 
 CREATE TABLE `oc_calendarsubscriptions` (
-  `id` bigint(20) UNSIGNED NOT NULL,
+  `id` bigint(20) NOT NULL,
   `uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
   `principaluri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
   `source` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
   `displayname` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
   `refreshrate` varchar(10) COLLATE utf8mb4_bin DEFAULT NULL,
-  `calendarorder` int(10) UNSIGNED NOT NULL DEFAULT '0',
+  `calendarorder` int(11) NOT NULL DEFAULT '0',
   `calendarcolor` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
   `striptodos` smallint(6) DEFAULT NULL,
   `stripalarms` smallint(6) DEFAULT NULL,
   `stripattachments` smallint(6) DEFAULT NULL,
-  `lastmodified` int(10) UNSIGNED DEFAULT NULL
+  `lastmodified` int(11) DEFAULT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPRESSED;
 
 -- --------------------------------------------------------
@@ -158,13 +158,13 @@
 --
 
 CREATE TABLE `oc_cards` (
-  `id` bigint(20) UNSIGNED NOT NULL,
+  `id` bigint(20) NOT NULL,
   `addressbookid` int(11) NOT NULL DEFAULT '0',
   `carddata` longblob,
   `uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
-  `lastmodified` bigint(20) UNSIGNED DEFAULT NULL,
+  `lastmodified` bigint(20) DEFAULT NULL,
   `etag` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL,
-  `size` bigint(20) UNSIGNED NOT NULL
+  `size` bigint(20) NOT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPRESSED;
 
 -- --------------------------------------------------------
@@ -174,9 +174,9 @@
 --
 
 CREATE TABLE `oc_cards_properties` (
-  `id` bigint(20) UNSIGNED NOT NULL,
+  `id` bigint(20) NOT NULL,
   `addressbookid` bigint(20) NOT NULL DEFAULT '0',
-  `cardid` bigint(20) UNSIGNED NOT NULL DEFAULT '0',
+  `cardid` bigint(20) NOT NULL DEFAULT '0',
   `name` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL,
   `value` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
   `preferred` int(11) NOT NULL DEFAULT '1'
@@ -189,11 +189,11 @@
 --
 
 CREATE TABLE `oc_dav_shares` (
-  `id` bigint(20) UNSIGNED NOT NULL,
+  `id` bigint(20) NOT NULL,
   `principaluri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
   `type` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
   `access` smallint(6) DEFAULT NULL,
-  `resourceid` int(10) UNSIGNED NOT NULL,
+  `resourceid` int(11) NOT NULL,
   `publicuri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPRESSED;
 
@@ -204,13 +204,13 @@
 --
 
 CREATE TABLE `oc_schedulingobjects` (
-  `id` bigint(20) UNSIGNED NOT NULL,
+  `id` bigint(20) NOT NULL,
   `principaluri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
   `calendardata` longblob,
   `uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
-  `lastmodified` int(10) UNSIGNED DEFAULT NULL,
+  `lastmodified` int(11) DEFAULT NULL,
   `etag` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL,
-  `size` bigint(20) UNSIGNED NOT NULL
+  `size` bigint(20) NOT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPRESSED;
 
 --

@rullzer rullzer force-pushed the dav-migrations branch from 3e94070 to db87e10 Sep 7, 2017

@codecov

This comment has been minimized.

Copy link

codecov bot commented Sep 7, 2017

Codecov Report

Merging #6264 into master will decrease coverage by 0.19%.
The diff coverage is 0%.

@@             Coverage Diff             @@
##             master    #6264     +/-   ##
===========================================
- Coverage     53.36%   53.17%   -0.2%     
- Complexity    22576    22588     +12     
===========================================
  Files          1409     1410      +1     
  Lines         87338    87757    +419     
  Branches       1340     1340             
===========================================
+ Hits          46611    46665     +54     
- Misses        40727    41092    +365
Impacted Files Coverage Δ Complexity Δ
...lib/Migration/Version1004001Date20170825134824.php 0% <0%> (ø) 12 <12> (?)
...ib/private/Files/ObjectStore/S3ConnectionTrait.php 54.16% <0%> (+54.16%) 22% <0%> (ø) ⬇️
lib/private/Files/ObjectStore/S3.php 73.68% <0%> (+73.68%) 5% <0%> (ø) ⬇️
@MorrisJobke

This comment has been minimized.

Copy link
Member

MorrisJobke commented Sep 18, 2017

@nickvergessen Mind to have another look?

Move DAV app to migrations
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>

@rullzer rullzer force-pushed the dav-migrations branch from db87e10 to 32234a2 Sep 18, 2017

@rullzer

This comment has been minimized.

Copy link
Member Author

rullzer commented Sep 18, 2017

I just rebased to make sure CI is green for this

@rullzer rullzer merged commit 66698b2 into master Sep 19, 2017

2 of 4 checks passed

codecov/patch 0% of diff hit (target 53.36%)
Details
codecov/project 53.17% (-0.2%) compared to ca5c3f8
Details
Scrutinizer 2 updated code elements
Details
continuous-integration/drone/pr the build was successful
Details

@rullzer rullzer deleted the dav-migrations branch Sep 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.