# Which fields would one expect to stay constant between moves?

**URL:** <https://discourse.beets.io/t/which-fields-would-one-expect-to-stay-constant-between-moves/1528>\
**Category:** Development\
**Created:** [September 30, 2020, 2:46am UTC](https://discourse.beets.io/t/which-fields-would-one-expect-to-stay-constant-between-moves/1528 "2020-09-30T02:46:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RollingStar](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/rollingstar/32/728_2.png) [@RollingStar](https://discourse.beets.io/u/RollingStar)\
**Post date:** [September 30, 2020, 2:46am UTC](https://discourse.beets.io/t/which-fields-would-one-expect-to-stay-constant-between-moves/1528/1 "2020-09-30T02:46:17Z")

</div>

I’m working on a test in support of [this](https://discourse.beets.io/t/should-we-start-recording-the-original-path-and-filename-on-import/1494). I want to test that only a whitelist of fields can change between moves. I have a few that I’m not sure about:

item fields:  
filesize # can changing filesystems change reported size?  
id  
initial\_key  
singleton # dynamically generated by beets

album:  
added # date added - static?

---

<div class="post-metadata">

**Author:** ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)\
**Post date:** [September 30, 2020, 1:32pm UTC](https://discourse.beets.io/t/which-fields-would-one-expect-to-stay-constant-between-moves/1528/2 "2020-09-30T13:32:37Z")

</div>

Interesting… could you elaborate a little more on what you’re imagining changing when a file moves? For example, I’m not sure why `initial_key` would change when a file moves. I guess it’s probably true that the file size could change when moving between filesystems… but I guess I would hope that beets wouldn’t need to worry about that somewhat strange possibility?

---

<div class="post-metadata">

**Author:** ![RollingStar](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/rollingstar/32/728_2.png) [@RollingStar](https://discourse.beets.io/u/RollingStar)\
**Post date:** [September 30, 2020, 9:52pm UTC](https://discourse.beets.io/t/which-fields-would-one-expect-to-stay-constant-between-moves/1528/3 "2020-09-30T21:52:21Z")

</div>

> Interesting… could you elaborate a little more on what you’re imagining changing when a file moves?

That’s just it - almost all fields I assume don’t change. I’m trying to whitelist the few that do and build a test for the rest.

```auto
fluid_item_fields = [self.i.path, self.i.mtime]
fluid_album_fields = [self.album.path, self.album.artpath]
fluid_fields = fluid_item_fields + fluid_album_fields

```

> [@adrian](#):
>
> For example, I’m not sure why `initial_key` would change when a file moves.

I don’t know what these fields are and especially don’t know how they are implemented. So I’m asking. There’s no documentation explaining all the fields, is there?

[https://beets.readthedocs.io/en/stable/changelog.html?highlight=initial\_key#april-15-2014](https://beets.readthedocs.io/en/stable/changelog.html?highlight=initial_key#april-15-2014)

Okay, so initial key is out. item.id is the internal beets ID for an item? Would that ever change in a move?

---

<div class="post-metadata">

**Author:** ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)\
**Post date:** [September 30, 2020, 11:40pm UTC](https://discourse.beets.io/t/which-fields-would-one-expect-to-stay-constant-between-moves/1528/4 "2020-09-30T23:40:19Z")

</div>

Alright—I guess my default assumption would be that _no_ fields change on a move except for `path`, which by definition must change because that’s the thing that’s changing. 😃 I’d definitely start with that assumption and go from there.

However, there’s a chance I’m missing something… let me know if you run into trouble with that assumption!
