diff --git a/app/Collection.php b/app/Collection.php index e0e110f2e..2e46078c2 100644 --- a/app/Collection.php +++ b/app/Collection.php @@ -3,9 +3,19 @@ namespace App; use Illuminate\Database\Eloquent\Model; +use Pixelfed\Snowflake\HasSnowflakePrimary; class Collection extends Model { + use HasSnowflakePrimary; + + /** + * Indicates if the IDs are auto-incrementing. + * + * @var bool + */ + public $incrementing = false; + public function profile() { return $this->belongsTo(Profile::class); diff --git a/app/CollectionItem.php b/app/CollectionItem.php index 7e306a33e..0a3f72cb8 100644 --- a/app/CollectionItem.php +++ b/app/CollectionItem.php @@ -3,9 +3,19 @@ namespace App; use Illuminate\Database\Eloquent\Model; +use Pixelfed\Snowflake\HasSnowflakePrimary; class CollectionItem extends Model { + use HasSnowflakePrimary; + + /** + * Indicates if the IDs are auto-incrementing. + * + * @var bool + */ + public $incrementing = false; + public function collection() { return $this->belongsTo(Collection::class);