Browse Source

remove old field DB

Marino Faggiana 8 năm trước cách đây
mục cha
commit
e59cc64f03

+ 0 - 9
iOSClient/FileSystem/CCCoreData.m

@@ -50,7 +50,6 @@
     record.cameraUploadWWAnPhoto = [NSNumber numberWithBool:NO];
     record.cameraUploadWWAnVideo = [NSNumber numberWithBool:NO];
         
-    record.dateRecord = [NSDate date];
     record.optimization = [NSDate date];
     record.password = password;
     record.url = url;
@@ -568,7 +567,6 @@
     
     TableCertificates *record = [TableCertificates MR_createEntityInContext:context];
     
-    record.dateRecord = [NSDate date];
     record.certificateLocation = certificateLocation;
     
     [context MR_saveToPersistentStoreAndWait];
@@ -614,7 +612,6 @@
     // set default value
     metadata.sessionTaskIdentifier = k_taskIdentifierDone;
     metadata.sessionTaskIdentifierPlist = k_taskIdentifierDone;
-    [record setValue:[NSDate date] forKey:@"dateRecord"];
 
     // Insert metdata -> entity
     [self insertMetadataInEntity:metadata recordMetadata:record activeAccount:activeAccount activeUrl:activeUrl];
@@ -894,7 +891,6 @@
         
         record.account = activeAccount;
         record.date = date;        
-        record.dateRecord = [NSDate date];
         record.directoryID = [CCUtility createID];
         directoryID = record.directoryID;
         record.permissions = permissions;
@@ -1277,7 +1273,6 @@
         
         record.account = activeAccount;
         record.date = metadata.date;
-        record.dateRecord = [NSDate date];
         record.fileID = metadata.fileID;
     
         record.exifDate = [NSDate date];
@@ -1557,7 +1552,6 @@
         
     if (!record) {
         record = [TableGPS MR_createEntityInContext:context];
-        record.dateRecord = [NSDate date];
     }
         
     record.latitude = latitude;
@@ -1602,7 +1596,6 @@
         TableShare *record = [TableShare MR_createEntityInContext:context];
         
         record.account = activeAccount;
-        record.dateRecord = [NSDate date];
         record.fileName = fileName;
         record.serverUrl = serverUrl;
         record.shareLink = share;
@@ -1630,7 +1623,6 @@
         TableShare *record = [TableShare MR_createEntityInContext:context];
         
         record.account = activeAccount;
-        record.dateRecord = [NSDate date];
         record.fileName = fileName;
         record.serverUrl = serverUrl;
         record.shareUserAndGroup = share;
@@ -1951,7 +1943,6 @@
     metadata.account = recordMetadata.account;
     metadata.cryptated = [recordMetadata.cryptated boolValue];
     metadata.date = recordMetadata.date;
-    metadata.dateRecord = recordMetadata.dateRecord;
     metadata.directory = [recordMetadata.directory boolValue];
     metadata.errorPasscode = [recordMetadata.errorPasscode boolValue];
     metadata.favorite = [recordMetadata.favorite boolValue];

+ 0 - 1
iOSClient/FileSystem/CCMetadata.h

@@ -29,7 +29,6 @@
 @property (nonatomic, strong) NSString *account;
 @property BOOL cryptated;
 @property NSDate *date;
-@property NSDate *dateRecord;
 @property BOOL directory;
 @property (nonatomic, strong) NSString *directoryID;
 @property BOOL errorPasscode;

+ 0 - 3
iOSClient/FileSystem/CCMetadata.m

@@ -44,7 +44,6 @@
     [metadata setAccount: self.account];
     [metadata setCryptated: self.cryptated];
     [metadata setDate: self.date];
-    [metadata setDateRecord: self.dateRecord];
     [metadata setDirectory: self.directory];
     [metadata setDirectoryID: self.directoryID];
     [metadata setErrorPasscode: self.errorPasscode];
@@ -86,7 +85,6 @@
         _account = [decoder decodeObjectForKey:@"account"];
         _cryptated = [decoder decodeBoolForKey:@"cryptated"];
         _date = [decoder decodeObjectForKey:@"date"];
-        _dateRecord = [decoder decodeObjectForKey:@"dateRecord"];
         _directory = [decoder decodeBoolForKey:@"directory"];
         _directoryID = [decoder decodeObjectForKey:@"directoryID"];
         _errorPasscode = [decoder decodeBoolForKey:@"errorPasscode"];
@@ -125,7 +123,6 @@
     [encoder encodeObject:_account forKey:@"account"];
     [encoder encodeBool:_cryptated forKey:@"cryptated"];
     [encoder encodeObject:_date forKey:@"date"];
-    [encoder encodeObject:_dateRecord forKey:@"dateRecord"];
     [encoder encodeBool:_directory forKey:@"directory"];
     [encoder encodeObject:_directoryID forKey:@"directoryID"];
     [encoder encodeBool:_errorPasscode forKey:@"errorPasscode"];

+ 0 - 1
iOSClient/FileSystem/TableAccount+CoreDataProperties.h

@@ -32,7 +32,6 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nullable, nonatomic, copy) NSNumber *cameraUploadVideo;
 @property (nullable, nonatomic, copy) NSNumber *cameraUploadWWAnPhoto;
 @property (nullable, nonatomic, copy) NSNumber *cameraUploadWWAnVideo;
-@property (nullable, nonatomic, copy) NSDate *dateRecord;
 @property (nullable, nonatomic, copy) NSDate *optimization;
 @property (nullable, nonatomic, copy) NSString *password;
 @property (nullable, nonatomic, copy) NSString *url;

+ 0 - 1
iOSClient/FileSystem/TableAccount+CoreDataProperties.m

@@ -31,7 +31,6 @@
 @dynamic cameraUploadVideo;
 @dynamic cameraUploadWWAnPhoto;
 @dynamic cameraUploadWWAnVideo;
-@dynamic dateRecord;
 @dynamic optimization;
 @dynamic password;
 @dynamic url;

+ 0 - 1
iOSClient/FileSystem/TableCertificates+CoreDataProperties.h

@@ -16,7 +16,6 @@ NS_ASSUME_NONNULL_BEGIN
 + (NSFetchRequest<TableCertificates *> *)fetchRequest;
 
 @property (nullable, nonatomic, copy) NSString *certificateLocation;
-@property (nullable, nonatomic, copy) NSDate *dateRecord;
 
 @end
 

+ 0 - 1
iOSClient/FileSystem/TableCertificates+CoreDataProperties.m

@@ -15,6 +15,5 @@
 }
 
 @dynamic certificateLocation;
-@dynamic dateRecord;
 
 @end

+ 0 - 1
iOSClient/FileSystem/TableDirectory+CoreDataProperties.h

@@ -18,7 +18,6 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nullable, nonatomic, copy) NSString *account;
 @property (nullable, nonatomic, copy) NSDate *date;
 @property (nullable, nonatomic, copy) NSDate *dateReadDirectory;
-@property (nullable, nonatomic, copy) NSDate *dateRecord;
 @property (nullable, nonatomic, copy) NSString *directoryID;
 @property (nullable, nonatomic, copy) NSNumber *favorite;
 @property (nullable, nonatomic, copy) NSString *fileID;

+ 0 - 1
iOSClient/FileSystem/TableDirectory+CoreDataProperties.m

@@ -17,7 +17,6 @@
 @dynamic account;
 @dynamic date;
 @dynamic dateReadDirectory;
-@dynamic dateRecord;
 @dynamic directoryID;
 @dynamic favorite;
 @dynamic fileID;

+ 0 - 1
iOSClient/FileSystem/TableGPS+CoreDataProperties.h

@@ -15,7 +15,6 @@ NS_ASSUME_NONNULL_BEGIN
 
 + (NSFetchRequest<TableGPS *> *)fetchRequest;
 
-@property (nullable, nonatomic, copy) NSDate *dateRecord;
 @property (nullable, nonatomic, copy) NSString *latitude;
 @property (nullable, nonatomic, copy) NSString *location;
 @property (nullable, nonatomic, copy) NSString *longitude;

+ 0 - 1
iOSClient/FileSystem/TableGPS+CoreDataProperties.m

@@ -14,7 +14,6 @@
 	return [[NSFetchRequest alloc] initWithEntityName:@"TableGPS"];
 }
 
-@dynamic dateRecord;
 @dynamic latitude;
 @dynamic location;
 @dynamic longitude;

+ 0 - 1
iOSClient/FileSystem/TableLocalFile+CoreDataProperties.h

@@ -17,7 +17,6 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nullable, nonatomic, copy) NSString *account;
 @property (nullable, nonatomic, copy) NSDate *date;
-@property (nullable, nonatomic, copy) NSDate *dateRecord;
 @property (nullable, nonatomic, copy) NSDate *exifDate;
 @property (nullable, nonatomic, copy) NSString *exifLatitude;
 @property (nullable, nonatomic, copy) NSString *exifLongitude;

+ 0 - 1
iOSClient/FileSystem/TableLocalFile+CoreDataProperties.m

@@ -16,7 +16,6 @@
 
 @dynamic account;
 @dynamic date;
-@dynamic dateRecord;
 @dynamic exifDate;
 @dynamic exifLatitude;
 @dynamic exifLongitude;

+ 0 - 1
iOSClient/FileSystem/TableMetadata+CoreDataProperties.h

@@ -18,7 +18,6 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nullable, nonatomic, copy) NSString *account;
 @property (nullable, nonatomic, copy) NSNumber *cryptated;
 @property (nullable, nonatomic, copy) NSDate *date;
-@property (nullable, nonatomic, copy) NSDate *dateRecord;
 @property (nullable, nonatomic, copy) NSNumber *directory;
 @property (nullable, nonatomic, copy) NSString *directoryID;
 @property (nullable, nonatomic, copy) NSNumber *errorPasscode;

+ 0 - 1
iOSClient/FileSystem/TableMetadata+CoreDataProperties.m

@@ -17,7 +17,6 @@
 @dynamic account;
 @dynamic cryptated;
 @dynamic date;
-@dynamic dateRecord;
 @dynamic directory;
 @dynamic directoryID;
 @dynamic errorPasscode;

+ 0 - 1
iOSClient/FileSystem/TableShare+CoreDataProperties.h

@@ -16,7 +16,6 @@ NS_ASSUME_NONNULL_BEGIN
 + (NSFetchRequest<TableShare *> *)fetchRequest;
 
 @property (nullable, nonatomic, copy) NSString *account;
-@property (nullable, nonatomic, copy) NSDate *dateRecord;
 @property (nullable, nonatomic, copy) NSString *fileName;
 @property (nullable, nonatomic, copy) NSString *serverUrl;
 @property (nullable, nonatomic, copy) NSString *shareLink;

+ 0 - 1
iOSClient/FileSystem/TableShare+CoreDataProperties.m

@@ -15,7 +15,6 @@
 }
 
 @dynamic account;
-@dynamic dateRecord;
 @dynamic fileName;
 @dynamic serverUrl;
 @dynamic shareLink;

+ 7 - 14
iOSClient/cryptocloud.xcdatamodeld/cryptocloud 7.xcdatamodel/contents

@@ -19,7 +19,6 @@
         <attribute name="cameraUploadVideo" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="cameraUploadWWAnPhoto" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="cameraUploadWWAnVideo" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
-        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="displayName" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="email" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="enabled" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
@@ -52,13 +51,11 @@
     </entity>
     <entity name="TableCertificates" representedClassName="TableCertificates" syncable="YES">
         <attribute name="certificateLocation" optional="YES" attributeType="String" syncable="YES"/>
-        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
     </entity>
     <entity name="TableDirectory" representedClassName="TableDirectory" syncable="YES">
         <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="dateReadDirectory" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
-        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="directoryID" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="favorite" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="fileID" optional="YES" attributeType="String" syncable="YES"/>
@@ -70,7 +67,6 @@
         <attribute name="synchronized" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
     </entity>
     <entity name="TableGPS" representedClassName="TableGPS" syncable="YES">
-        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="latitude" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="location" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="longitude" optional="YES" attributeType="String" syncable="YES"/>
@@ -83,7 +79,6 @@
     <entity name="TableLocalFile" representedClassName="TableLocalFile" syncable="YES">
         <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
-        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="exifDate" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="exifLatitude" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="exifLongitude" optional="YES" attributeType="String" syncable="YES"/>
@@ -99,7 +94,6 @@
         <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="cryptated" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
-        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="directory" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="directoryID" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="errorPasscode" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
@@ -131,20 +125,19 @@
     </entity>
     <entity name="TableShare" representedClassName="TableShare" syncable="YES">
         <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
-        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="fileName" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="serverUrl" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="shareLink" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="shareUserAndGroup" optional="YES" attributeType="String" syncable="YES"/>
     </entity>
     <elements>
-        <element name="TableAccount" positionX="-6597" positionY="111" width="171" height="600"/>
+        <element name="TableAccount" positionX="-6597" positionY="111" width="171" height="585"/>
         <element name="TableAutomaticUpload" positionX="-6597" positionY="801" width="128" height="180"/>
-        <element name="TableCertificates" positionX="-6597" positionY="711" width="128" height="75"/>
-        <element name="TableDirectory" positionX="-6372" positionY="111" width="162" height="240"/>
-        <element name="TableGPS" positionX="-6597" positionY="990" width="128" height="180"/>
-        <element name="TableLocalFile" positionX="-6138" positionY="111" width="162" height="240"/>
-        <element name="TableMetadata" positionX="-6138" positionY="402" width="162" height="525"/>
-        <element name="TableShare" positionX="-6597" positionY="558" width="128" height="135"/>
+        <element name="TableCertificates" positionX="-6597" positionY="711" width="128" height="60"/>
+        <element name="TableDirectory" positionX="-6372" positionY="111" width="162" height="225"/>
+        <element name="TableGPS" positionX="-6597" positionY="990" width="128" height="165"/>
+        <element name="TableLocalFile" positionX="-6138" positionY="111" width="162" height="225"/>
+        <element name="TableMetadata" positionX="-6138" positionY="402" width="162" height="510"/>
+        <element name="TableShare" positionX="-6597" positionY="558" width="128" height="120"/>
     </elements>
 </model>