Graphs and tables for your Spotify account.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
3.0 KiB

  1. # Generated by Django 2.0.5 on 2018-06-07 00:52
  2. from django.db import migrations, models
  3. import django.db.models.deletion
  4. class Migration(migrations.Migration):
  5. initial = True
  6. dependencies = [
  7. ]
  8. operations = [
  9. migrations.CreateModel(
  10. name='Artist',
  11. fields=[
  12. ('artist_id', models.CharField(max_length=30, primary_key=True, serialize=False)),
  13. ('name', models.CharField(max_length=50, unique=True)),
  14. ('genre', models.CharField(max_length=20)),
  15. ],
  16. options={
  17. 'verbose_name': 'Artist',
  18. 'verbose_name_plural': 'Artists',
  19. },
  20. ),
  21. migrations.CreateModel(
  22. name='Track',
  23. fields=[
  24. ('track_id', models.CharField(max_length=30, primary_key=True, serialize=False)),
  25. ('year', models.PositiveSmallIntegerField()),
  26. ('popularity', models.PositiveSmallIntegerField()),
  27. ('runtime', models.PositiveSmallIntegerField()),
  28. ('name', models.CharField(max_length=75)),
  29. ],
  30. options={
  31. 'verbose_name': 'Track',
  32. 'verbose_name_plural': 'Tracks',
  33. },
  34. ),
  35. migrations.CreateModel(
  36. name='User',
  37. fields=[
  38. ('user_id', models.CharField(max_length=30, primary_key=True, serialize=False)),
  39. ],
  40. options={
  41. 'verbose_name': 'User',
  42. 'verbose_name_plural': 'Users',
  43. },
  44. ),
  45. migrations.CreateModel(
  46. name='AudioFeatures',
  47. fields=[
  48. ('track', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='spotifyvis.Track')),
  49. ('acousticness', models.DecimalField(decimal_places=3, max_digits=3)),
  50. ('danceability', models.DecimalField(decimal_places=3, max_digits=3)),
  51. ('energy', models.DecimalField(decimal_places=3, max_digits=3)),
  52. ('instrumentalness', models.DecimalField(decimal_places=3, max_digits=3)),
  53. ('loudness', models.DecimalField(decimal_places=3, max_digits=6)),
  54. ('speechiness', models.DecimalField(decimal_places=3, max_digits=3)),
  55. ('tempo', models.DecimalField(decimal_places=3, max_digits=6)),
  56. ('valence', models.DecimalField(decimal_places=3, max_digits=3)),
  57. ],
  58. options={
  59. 'verbose_name': 'AudioFeatures',
  60. 'verbose_name_plural': 'AudioFeatures',
  61. },
  62. ),
  63. migrations.AddField(
  64. model_name='track',
  65. name='artists',
  66. field=models.ManyToManyField(blank=True, to='spotifyvis.Artist'),
  67. ),
  68. migrations.AddField(
  69. model_name='track',
  70. name='users',
  71. field=models.ManyToManyField(blank=True, to='spotifyvis.User'),
  72. ),
  73. ]