Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
django-panik-nonstop
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
radiopanik
django-panik-nonstop
Commits
e1d70575
Commit
e1d70575
authored
Jan 25, 2015
by
fred
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to Django 1.7 migrations
parent
422dd902
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
197 deletions
+75
-197
nonstop/migrations/0001_initial.py
nonstop/migrations/0001_initial.py
+75
-45
nonstop/migrations/0002_auto__add_album__add_artist__add_track__add_field_nonstopfile_track.py
...um__add_artist__add_track__add_field_nonstopfile_track.py
+0
-93
nonstop/migrations/0003_auto__add_field_track_cfwb.py
nonstop/migrations/0003_auto__add_field_track_cfwb.py
+0
-59
No files found.
nonstop/migrations/0001_initial.py
View file @
e1d70575
# -*- coding: utf-8 -*-
import
datetime
from
south.db
import
db
from
south.v2
import
SchemaMigration
from
django.db
import
models
from
__future__
import
unicode_literals
from
django.db
import
models
,
migrations
class
Migration
(
SchemaMigration
):
def
forwards
(
self
,
orm
):
# Adding model 'NonstopFile'
db
.
create_table
(
u
'nonstop_nonstopfile'
,
(
(
u
'id'
,
self
.
gf
(
'django.db.models.fields.AutoField'
)(
primary_key
=
True
)),
(
'filepath'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
max_length
=
255
)),
(
'creation_timestamp'
,
self
.
gf
(
'django.db.models.fields.DateTimeField'
)(
auto_now_add
=
True
,
null
=
True
,
blank
=
True
)),
))
db
.
send_create_signal
(
u
'nonstop'
,
[
'NonstopFile'
])
class
Migration
(
migrations
.
Migration
):
# Adding model 'SomaLogLine'
db
.
create_table
(
u
'nonstop_somalogline'
,
(
(
u
'id'
,
self
.
gf
(
'django.db.models.fields.AutoField'
)(
primary_key
=
True
)),
(
'filepath'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
to
=
orm
[
'nonstop.NonstopFile'
])),
(
'play_timestamp'
,
self
.
gf
(
'django.db.models.fields.DateTimeField'
)()),
))
db
.
send_create_signal
(
u
'nonstop'
,
[
'SomaLogLine'
])
dependencies
=
[
]
def
backwards
(
self
,
orm
):
# Deleting model 'NonstopFile'
db
.
delete_table
(
u
'nonstop_nonstopfile'
)
# Deleting model 'SomaLogLine'
db
.
delete_table
(
u
'nonstop_somalogline'
)
models
=
{
u
'nonstop.nonstopfile'
:
{
'Meta'
:
{
'object_name'
:
'NonstopFile'
},
'creation_timestamp'
:
(
'django.db.models.fields.DateTimeField'
,
[],
{
'auto_now_add'
:
'True'
,
'null'
:
'True'
,
'blank'
:
'True'
}),
'filepath'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
})
},
u
'nonstop.somalogline'
:
{
'Meta'
:
{
'ordering'
:
"['play_timestamp']"
,
'object_name'
:
'SomaLogLine'
},
'filepath'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
u
"orm['nonstop.NonstopFile']"
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'play_timestamp'
:
(
'django.db.models.fields.DateTimeField'
,
[],
{})
}
}
complete_apps
=
[
'nonstop'
]
\ No newline at end of file
operations
=
[
migrations
.
CreateModel
(
name
=
'Album'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
verbose_name
=
'ID'
,
serialize
=
False
,
auto_created
=
True
,
primary_key
=
True
)),
(
'name'
,
models
.
CharField
(
max_length
=
255
,
verbose_name
=
'Name'
)),
],
options
=
{
},
bases
=
(
models
.
Model
,),
),
migrations
.
CreateModel
(
name
=
'Artist'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
verbose_name
=
'ID'
,
serialize
=
False
,
auto_created
=
True
,
primary_key
=
True
)),
(
'name'
,
models
.
CharField
(
max_length
=
255
,
verbose_name
=
'Name'
)),
],
options
=
{
'ordering'
:
[
'name'
],
},
bases
=
(
models
.
Model
,),
),
migrations
.
CreateModel
(
name
=
'NonstopFile'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
verbose_name
=
'ID'
,
serialize
=
False
,
auto_created
=
True
,
primary_key
=
True
)),
(
'filepath'
,
models
.
CharField
(
max_length
=
255
,
verbose_name
=
'Filepath'
)),
(
'creation_timestamp'
,
models
.
DateTimeField
(
auto_now_add
=
True
,
null
=
True
)),
],
options
=
{
},
bases
=
(
models
.
Model
,),
),
migrations
.
CreateModel
(
name
=
'SomaLogLine'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
verbose_name
=
'ID'
,
serialize
=
False
,
auto_created
=
True
,
primary_key
=
True
)),
(
'play_timestamp'
,
models
.
DateTimeField
()),
(
'filepath'
,
models
.
ForeignKey
(
to
=
'nonstop.NonstopFile'
)),
],
options
=
{
'ordering'
:
[
'play_timestamp'
],
'verbose_name'
:
'Soma log line'
,
'verbose_name_plural'
:
'Soma log lines'
,
},
bases
=
(
models
.
Model
,),
),
migrations
.
CreateModel
(
name
=
'Track'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
verbose_name
=
'ID'
,
serialize
=
False
,
auto_created
=
True
,
primary_key
=
True
)),
(
'title'
,
models
.
CharField
(
max_length
=
255
,
verbose_name
=
'Title'
)),
(
'instru'
,
models
.
BooleanField
(
default
=
False
,
verbose_name
=
'Instru'
)),
(
'language'
,
models
.
CharField
(
blank
=
True
,
max_length
=
3
,
choices
=
[(
b
'en'
,
'English'
),
(
b
'fr'
,
'French'
),
(
b
'nl'
,
'Dutch'
)])),
(
'sabam'
,
models
.
BooleanField
(
default
=
True
,
verbose_name
=
b
'SABAM'
)),
(
'cfwb'
,
models
.
BooleanField
(
default
=
False
,
verbose_name
=
b
'CFWB'
)),
(
'album'
,
models
.
ForeignKey
(
to
=
'nonstop.Album'
,
null
=
True
)),
(
'artist'
,
models
.
ForeignKey
(
to
=
'nonstop.Artist'
,
null
=
True
)),
],
options
=
{
},
bases
=
(
models
.
Model
,),
),
migrations
.
AddField
(
model_name
=
'nonstopfile'
,
name
=
'track'
,
field
=
models
.
ForeignKey
(
to
=
'nonstop.Track'
,
null
=
True
),
preserve_default
=
True
,
),
]
nonstop/migrations/0002_auto__add_album__add_artist__add_track__add_field_nonstopfile_track.py
deleted
100644 → 0
View file @
422dd902
# -*- coding: utf-8 -*-
import
datetime
from
south.db
import
db
from
south.v2
import
SchemaMigration
from
django.db
import
models
class
Migration
(
SchemaMigration
):
def
forwards
(
self
,
orm
):
# Adding model 'Album'
db
.
create_table
(
u
'nonstop_album'
,
(
(
u
'id'
,
self
.
gf
(
'django.db.models.fields.AutoField'
)(
primary_key
=
True
)),
(
'name'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
max_length
=
255
)),
))
db
.
send_create_signal
(
u
'nonstop'
,
[
'Album'
])
# Adding model 'Artist'
db
.
create_table
(
u
'nonstop_artist'
,
(
(
u
'id'
,
self
.
gf
(
'django.db.models.fields.AutoField'
)(
primary_key
=
True
)),
(
'name'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
max_length
=
255
)),
))
db
.
send_create_signal
(
u
'nonstop'
,
[
'Artist'
])
# Adding model 'Track'
db
.
create_table
(
u
'nonstop_track'
,
(
(
u
'id'
,
self
.
gf
(
'django.db.models.fields.AutoField'
)(
primary_key
=
True
)),
(
'title'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
max_length
=
255
)),
(
'artist'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
to
=
orm
[
'nonstop.Artist'
],
null
=
True
)),
(
'album'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
to
=
orm
[
'nonstop.Album'
],
null
=
True
)),
(
'instru'
,
self
.
gf
(
'django.db.models.fields.BooleanField'
)(
default
=
False
)),
(
'language'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
max_length
=
3
,
blank
=
True
)),
(
'sabam'
,
self
.
gf
(
'django.db.models.fields.BooleanField'
)(
default
=
True
)),
))
db
.
send_create_signal
(
u
'nonstop'
,
[
'Track'
])
# Adding field 'NonstopFile.track'
db
.
add_column
(
u
'nonstop_nonstopfile'
,
'track'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
to
=
orm
[
'nonstop.Track'
],
null
=
True
),
keep_default
=
False
)
def
backwards
(
self
,
orm
):
# Deleting model 'Album'
db
.
delete_table
(
u
'nonstop_album'
)
# Deleting model 'Artist'
db
.
delete_table
(
u
'nonstop_artist'
)
# Deleting model 'Track'
db
.
delete_table
(
u
'nonstop_track'
)
# Deleting field 'NonstopFile.track'
db
.
delete_column
(
u
'nonstop_nonstopfile'
,
'track_id'
)
models
=
{
u
'nonstop.album'
:
{
'Meta'
:
{
'object_name'
:
'Album'
},
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
})
},
u
'nonstop.artist'
:
{
'Meta'
:
{
'object_name'
:
'Artist'
},
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
})
},
u
'nonstop.nonstopfile'
:
{
'Meta'
:
{
'object_name'
:
'NonstopFile'
},
'creation_timestamp'
:
(
'django.db.models.fields.DateTimeField'
,
[],
{
'auto_now_add'
:
'True'
,
'null'
:
'True'
,
'blank'
:
'True'
}),
'filepath'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'track'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
u
"orm['nonstop.Track']"
,
'null'
:
'True'
})
},
u
'nonstop.somalogline'
:
{
'Meta'
:
{
'ordering'
:
"['play_timestamp']"
,
'object_name'
:
'SomaLogLine'
},
'filepath'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
u
"orm['nonstop.NonstopFile']"
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'play_timestamp'
:
(
'django.db.models.fields.DateTimeField'
,
[],
{})
},
u
'nonstop.track'
:
{
'Meta'
:
{
'object_name'
:
'Track'
},
'album'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
u
"orm['nonstop.Album']"
,
'null'
:
'True'
}),
'artist'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
u
"orm['nonstop.Artist']"
,
'null'
:
'True'
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'instru'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'False'
}),
'language'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'3'
,
'blank'
:
'True'
}),
'sabam'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'True'
}),
'title'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
})
}
}
complete_apps
=
[
'nonstop'
]
\ No newline at end of file
nonstop/migrations/0003_auto__add_field_track_cfwb.py
deleted
100644 → 0
View file @
422dd902
# -*- coding: utf-8 -*-
import
datetime
from
south.db
import
db
from
south.v2
import
SchemaMigration
from
django.db
import
models
class
Migration
(
SchemaMigration
):
def
forwards
(
self
,
orm
):
# Adding field 'Track.cfwb'
db
.
add_column
(
u
'nonstop_track'
,
'cfwb'
,
self
.
gf
(
'django.db.models.fields.BooleanField'
)(
default
=
False
),
keep_default
=
False
)
def
backwards
(
self
,
orm
):
# Deleting field 'Track.cfwb'
db
.
delete_column
(
u
'nonstop_track'
,
'cfwb'
)
models
=
{
u
'nonstop.album'
:
{
'Meta'
:
{
'object_name'
:
'Album'
},
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
})
},
u
'nonstop.artist'
:
{
'Meta'
:
{
'object_name'
:
'Artist'
},
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
})
},
u
'nonstop.nonstopfile'
:
{
'Meta'
:
{
'object_name'
:
'NonstopFile'
},
'creation_timestamp'
:
(
'django.db.models.fields.DateTimeField'
,
[],
{
'auto_now_add'
:
'True'
,
'null'
:
'True'
,
'blank'
:
'True'
}),
'filepath'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'track'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
u
"orm['nonstop.Track']"
,
'null'
:
'True'
})
},
u
'nonstop.somalogline'
:
{
'Meta'
:
{
'ordering'
:
"['play_timestamp']"
,
'object_name'
:
'SomaLogLine'
},
'filepath'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
u
"orm['nonstop.NonstopFile']"
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'play_timestamp'
:
(
'django.db.models.fields.DateTimeField'
,
[],
{})
},
u
'nonstop.track'
:
{
'Meta'
:
{
'object_name'
:
'Track'
},
'album'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
u
"orm['nonstop.Album']"
,
'null'
:
'True'
}),
'artist'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
u
"orm['nonstop.Artist']"
,
'null'
:
'True'
}),
'cfwb'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'False'
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'instru'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'False'
}),
'language'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'3'
,
'blank'
:
'True'
}),
'sabam'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'True'
}),
'title'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
})
}
}
complete_apps
=
[
'nonstop'
]
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment