waveterm/wavesrv/db/migrations
Sylvie Crowe 8cbee1e1c3
Allow dots in alias and add port to canonical name (#209)
* allow numerical start and allow dots in ssh alias

We previously restricted the ssh alias to start with an
alphabetic character and did not allow dots within it. This caused
problems with users wanting to use an ip address as an alias. This lifts
that restriction so both can freely be used.

Note that while it is common to use the hostname as the alias, hostnames
are not allowed to use the underscore character. However, we do allow
the alias to contain an underscore. I do not think we can remove this
from aliases now but it is something to watch out for in the future.

* allow backslash in username

This involved converting the regexp string into a raw string to able to
use the backslash character. this is important.

* Revert "allow backslash in username"

This reverts commit cafe281241. Upon
reflection, more time is needed to evaluate that this actually corrects
the issue. It will be performed with proper diligence at a later time.

* add port to end of canoncial names when not 22

The canonical name is the identifying key in the database, so it causes
problems if another remote entry has the same canonical name. By adding
the port number to the end of this, it is possible to differentiate the
two.

* add db migrations for adding port to canonicalname

The up migration adds the port to the existing canonical id if it exists
and is not 22. The down migration strips the port off the canonical name
and deletes extra remotes with the same canonical name. If all remotes
with that canonical name have been archived, it keeps the first one
added to the database. If any have not been archived, it keeps the first
added to the database from the non-archived group.

* remove ability to edit port number via ssh import

Previously, ssh imports could edit the port number since it was possible
to change them in the config file without changin the canonical name.
Now that the canonical name contains the port, a change in the port will
simply create a new database entry. For this reason, the ability to
modify the ssh port is dead code and has been removed.

* allow backslash in username

This involved converting the regexp string into a raw string to able to
use the backslash character. this is important.

* simplify up migration logic

The previous up migration was suboptimal because it was accounting for a
corner case not found in production. That case no longer needs to be
considered, so the procedure was simplified.
2024-01-04 10:16:26 -08:00
..
000001_init.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000001_init.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000002_activity.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000002_activity.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000003_renderer.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000003_renderer.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000004_bookmarks.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000004_bookmarks.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000005_buildtime.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000005_buildtime.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000006_feopts.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000006_feopts.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000007_playbooks.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000007_playbooks.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000008_cloudsession.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000008_cloudsession.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000009_screenprimary.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000009_screenprimary.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000010_removewindowid.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000010_removewindowid.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000011_cmdscreenid.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000011_cmdscreenid.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000012_historylinenum.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000012_historylinenum.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000013_cmdmigration.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000013_cmdmigration.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000014_simplifybookmarks.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000014_simplifybookmarks.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000015_lineupdates.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000015_lineupdates.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000016_webptypos.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000016_webptypos.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000017_remotevars.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000017_remotevars.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000018_modremote.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000018_modremote.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000019_clientopenai.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000019_clientopenai.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000020_linecmd.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000020_linecmd.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000021_linestate.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000021_linestate.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000022_endwebshare.down.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000022_endwebshare.up.sql move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00
000023_autoinstall.down.sql remove autoinstall options from GUI, always set autoinstall flag, db migration to set autoinstall for all remotes (#48) 2023-10-25 22:07:00 -07:00
000023_autoinstall.up.sql remove autoinstall options from GUI, always set autoinstall flag, db migration to set autoinstall for all remotes (#48) 2023-10-25 22:07:00 -07:00
000024_updatetabcolornames.down.sql update color tab names (#49) 2023-10-28 13:14:20 -07:00
000024_updatetabcolornames.up.sql new tab colors. also re-implement tab gradients according to figma file 2023-11-01 22:38:37 -07:00
000025_releaseinfo.down.sql Add sidebar banner when new release is available (#147) 2023-12-15 17:43:54 -08:00
000025_releaseinfo.up.sql Add sidebar banner when new release is available (#147) 2023-12-15 17:43:54 -08:00
000026_screenviewopts.down.sql Implement a Sidebar for Tabs (#157) 2023-12-17 23:46:53 -08:00
000026_screenviewopts.up.sql Implement a Sidebar for Tabs (#157) 2023-12-17 23:46:53 -08:00
000027_historyupdates.down.sql big update to screen/session delete, and clear (#199) 2023-12-27 13:11:53 -08:00
000027_historyupdates.up.sql big update to screen/session delete, and clear (#199) 2023-12-27 13:11:53 -08:00
000028_sshkeysource.down.sql ssh config import (#156) 2023-12-28 11:09:41 -08:00
000028_sshkeysource.up.sql ssh config import (#156) 2023-12-28 11:09:41 -08:00
000029_canonicalport.down.sql Allow dots in alias and add port to canonical name (#209) 2024-01-04 10:16:26 -08:00
000029_canonicalport.up.sql Allow dots in alias and add port to canonical name (#209) 2024-01-04 10:16:26 -08:00